| View previous topic :: View next topic |
| Author |
Message |
fls Voice
Joined: 17 Oct 2007 Posts: 35
|
Posted: Sat Apr 12, 2008 9:06 am Post subject: Global ban |
|
|
Hi, can someone write a particular command just for this? in the bot banlist
bind pub n|n .Globalban gban_pub
bind pub n|n .Globalunban gban_pub
bind pub n|n .Globalbanlist gban_pub
Usage: !Globalban <nick or hostmask> <time> <reason>"
The ban in *@*.host.tld
Regard |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Sat Apr 12, 2008 10:30 am Post subject: |
|
|
This is gban_pub:
| Code: | bind pub n|n .globalban gban_pub
proc gban_pub {nick uhost hand chan arg} {
if {[scan $arg "%s %d %\[^\n\]" mask time rsn] != 3} {
puthelp "privmsg $chan :SYNTAX: .globalban <mask/nick> <time> <reason>"
return
}
if {![string match *@* $mask]} {
if {![onchan $mask $chan]} {
puthelp "privmsg $chan :$mask is not here."
return
}
set mask [getchanhost $mask $chan]
}
newban $mask $nick $rsn $time
puthelp "privmsg $chan :added $mask to global ban list"
} |
Use it to write the other 2 procedures. _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
|