DoctorD90 icon

PartOnKick.tcl

DoctorD90 | PRO | 05/05/13 04:23:20 PM UTC | 0 ⭐ | 6200 👁️ | Never ⏰ | []
TCL |

1.77 KB

|

None

|

0 👍

/

0 👎

### PartOnKick.tcl 3.0.1 rneyb9Jt
 
#REQUIREMENTS
# nOwn.tcl dr7v2Zmq
 
#SUGGESTED
# PBinSrc.tcl fMrtKqyq
# TCLLoader.tcl smApj15u
 
#LICENSE
# Copyright © 2013 Alberto Dietze "DoctorD90"
#
#    This program is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
# Full GPLv3 Text: http://www.gnu.org/licenses/gpl.txt
 
#PATERNITY
#Coder: DoctorD90
#Network: irc.OnlineGamesNet.net
#Chan: #eHito
#Mail: [email protected]
#Script's List: www.EggTcl.tk
 
#PURPOSE
#Bot will auto part if kicked.
 
#USAGE
#Add this script to your eggdrop's list to load it.
 
 
### DON'T EDIT ANYTHING BELOW ###
 
bind raw - KICK raw_kick
proc raw_kick {from key text} {
  foreach {chan target} [split $text] { break }
  if {![validchan $chan] || [string tolower $target] != [string tolower $::botnick]} {
    return
  }
  channel remove $chan
  save
  foreach {nick uhost} [split $from !] { break }
  set why [string range [join [lrange [split $text] 2 end]] 1 end]
  if {![string length [string trim $why]]} {
   set why "Nothing"
  }
  putserv "PRIVMSG [nown] :\002Kicked\002 by \037$nick\037 (\037$uhost\037) from \037$chan\037 for \037$why\037"
}
 
###
putlog "PartOnKick.tcl LOADED"

Comments