Advertisement
DoctorD90

PartOnKick.tcl 3.0.0

May 5th, 2013
66
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. #Mail: DoctorD90@EggTcl.tk
  33. #Script's List: www.EggTcl.tk
  34.  
  35. #PURPOSE
  36. #Bot will auto part if kicked.
  37.  
  38. #USAGE
  39. #Add this script to your eggdrop's list to load it.
  40.  
  41.  
  42. ### DON'T EDIT ANYTHING BELOW ###
  43.  
  44. bind raw - KICK raw_kick
  45. proc raw_kick {from key text} {
  46.   foreach {chan target} [split $text] { break }
  47.   if {![validchan $chan] || [string tolower $target] != [string tolower $::botnick]} {
  48.     return
  49.   }
  50.   channel remove $chan
  51.   save
  52.   foreach {nick uhost} [split $from !] { break }
  53.   set why [string range [join [lrange [split $text] 2 end]] 1 end]
  54.   if {![string length [string trim $why]]} {
  55.    set why "Nothing"
  56.   }
  57.   privmsg [nown] "\002Kicked\002 by \037$nick\037 (\037$uhost\037) from \037$chan\037 for \037$why\037"
  58. }
  59.  
  60. ###
  61. putlog "PartOnKick.tcl LOADED"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement