Advertisement
IRCgo

IRCop Scan.tcl

Mar 25th, 2023
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.66 KB | None | 0 0
  1. ######################################################
  2. ### IRCopScan.tcl by _]NiX[_ <[email protected]> ###
  3. ### scan for irc operator who joined your channels ###
  4. ### http://valium.org ###
  5. ######################################################
  6.  
  7. # start IRCopScan.tcl by default?
  8. set operscan(start) 1
  9.  
  10. # send a notice to channel operator (only if bot is chanop)
  11. set operscan(noticechanop) 1
  12.  
  13. ######################################################
  14.  
  15. bind join - * IRCopScanOnJoin
  16. proc IRCopScanOnJoin {nick uh hand chan} {
  17. global operscan scanoperchan botnick
  18. if {$operscan(start) && $nick != "$botnick"} {
  19. set scanoperchan($nick) "$chan"
  20. putserv "USERHOST $nick"
  21. }
  22. }
  23.  
  24. bind raw - "302" IRCopScan302
  25. proc IRCopScan302 {from key text} {
  26. global operscan scanoperchan
  27. set text "[lindex $text 1]"
  28. set nick [lindex [split "$text" :=*] 1]
  29. if {($operscan(start)) && ([info exists scanoperchan($nick)]) && ([string match *\\* [lindex [split "$text" =] 0]])} {
  30. set chan $scanoperchan($nick)
  31. putlog "$nick is an IRC Operator - detected on $chan"
  32. if {([botisop $scanoperchan($nick)]) && ($operscan(noticechanop))} {
  33. foreach u [chanlist $chan] {
  34. if {[isop $u $chan]} {putserv "NOTICE $u :$nick is an IRC Operator - detected on $chan"}
  35. }
  36. }
  37. unset scanoperchan($nick)
  38. }
  39. }
  40.  
  41. bind dcc m IRCopScan IRCopScanDCC
  42. proc IRCopScanDCC {hand idx args} {
  43. global operscan
  44. if {$operscan(start)} {
  45. set operscan(start) 0
  46. putdcc $idx "IRCop scanner deactivated"
  47. } {
  48. set operscan(start) 1
  49. putdcc $idx "IRCop scanner activated"
  50. }
  51. return 1
  52. }
  53.  
  54. putlog "IRCopScan.tcl - (.ircopscan to turn on/off)"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement