DoctorD90

PartOnKick.tcl 3.0.0

May 5th, 2013
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ### PartOnKick.tcl 3.0.0 rneyb9Jt
  2.  
  3. #REQUIREMENTS
  4. # nOwn.tcl dr7v2Zmq
  5.  
  6. #SUGGESTED
  7. # PBinSrc.tcl fMrtKqyq
  8. # TCLLoader.tcl smApj15u
  9.  
  10. #LICENSE
  11. # Copyright © 2013 Alberto Dietze "DoctorD90"
  12. #
  13. #    This program is free software: you can redistribute it and/or modify
  14. #    it under the terms of the GNU General Public License as published by
  15. #    the Free Software Foundation, either version 3 of the License, or
  16. #    (at your option) any later version.
  17. #
  18. #    This program is distributed in the hope that it will be useful,
  19. #    but WITHOUT ANY WARRANTY; without even the implied warranty of
  20. #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  21. #    GNU General Public License for more details.
  22. #
  23. #    You should have received a copy of the GNU General Public License
  24. #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
  25. #
  26. # Full GPLv3 Text: http://www.gnu.org/licenses/gpl.txt
  27.  
  28. #PATERNITY
  29. #Coder: DoctorD90
  30. #Network: irc.OnlineGamesNet.net
  31. #Chan: #eHito
  32. #Script's List: www.EggTcl.tk
  33.  
  34. #PURPOSE
  35. #Bot will auto part if kicked.
  36.  
  37. #USAGE
  38. #Add this script to your eggdrop's list to load it.
  39.  
  40.  
  41. ### DON'T EDIT ANYTHING BELOW ###
  42.  
  43. bind raw - KICK raw_kick
  44. proc raw_kick {from key text} {
  45.   foreach {chan target} [split $text] { break }
  46.   if {![validchan $chan] || [string tolower $target] != [string tolower $::botnick]} {
  47.     return
  48.   }
  49.   channel remove $chan
  50.   save
  51.   foreach {nick uhost} [split $from !] { break }
  52.   set why [string range [join [lrange [split $text] 2 end]] 1 end]
  53.   if {![string length [string trim $why]]} {
  54.    set why "Nothing"
  55.   }
  56.   privmsg [nown] "\002Kicked\002 by \037$nick\037 (\037$uhost\037) from \037$chan\037 for \037$why\037"
  57. }
  58.  
  59. ###
  60. putlog "PartOnKick.tcl LOADED"
Advertisement