Changeset 39
- Timestamp:
- 02/17/08 18:19:56 (4 years ago)
- File:
-
- 1 edited
-
GuardChan/guardchan.tcl (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
GuardChan/guardchan.tcl
r8 r39 8 8 # Instructions: 9 9 # - edit the owner setting below to your nick 10 # - choose if you want just kicks or bans too 10 11 # - load script 11 12 # - for channels you want to protect: .chanset #channel +guardchan 12 13 13 # Only configurable setting(default has invalid char in to make sure you set it)14 # (default has invalid char in to make sure you set it) 14 15 set guardchan_owner "YOUR_NICK_HERE%" 15 16 17 # set to 1 to ban users rather than just kick them 18 set guardchan_ban 0 19 16 20 # Stop editing here unless you like TCL 21 # 22 # 23 # 24 # 25 # 26 # 27 # No really, TCL is a world of pain ;) 17 28 18 29 bind join - *!*@* guardchan_join … … 21 32 22 33 proc guardchan_join { nick host handle channel } { 23 global guardchan_owner 34 global guardchan_owner guardchan_ban 35 24 36 if {![channel get $channel guardchan]} { 25 37 return 0 … … 28 40 if {$handle == "*"} { 29 41 if [botisop $channel] { 30 putkick $channel $nick "You are not permitted to be in here" 31 puthelp "PRIVMSG $guardchan_owner :Kicked $nick from $channel" 42 if {!$guardchan_ban} { 43 putkick $channel $nick "You are not permitted to be in here" 44 puthelp "PRIVMSG $guardchan_owner :Kicked $nick from $channel" 45 } else { 46 set ban [maskhost "$nick!$host"] 47 newchanban $channel $ban "guardchan" "Banned for not being in userfile" 48 puthelp "PRIVMSG $guardchan_owner :Banned $nick from $channel" 49 } 32 50 return 0 33 51 } else { … … 37 55 } 38 56 } 57
Note: See TracChangeset
for help on using the changeset viewer.
