| View previous topic :: View next topic |
| Author |
Message |
dusk Halfop

Joined: 06 Mar 2005 Posts: 91 Location: Belgium
|
Posted: Sat Jan 28, 2006 9:07 pm Post subject: help with ban |
|
|
I'm using a public kickban command but yesterday I noticed something goes wrong...
| Code: |
(01:54) Join: tripke (triplelion@d54C1F0D0.access.telenet.be) has join
(01:54) <@reef> !kb tripke
(01:54) * Doogie sets mode: +b *!*triplelio@d54C1F0D0.access.telenet.be
(01:54) Kick: tripke was kicked by Doogie (banned) on #chan
(01:54) Join: tripke (triplelion@d54C1F0D0.access.telenet.be) has join |
As you can see the bot doesn't set the correct ban (missing n after triplelio)
This is the proc I'm working with :
| Code: |
proc kickban {nik uhost hand chn txt} {
global botnick
set nick [lindex $txt 0]
set reas [lrange $txt 1 end]
set target [getchanhost $nick $chn]
set banmask "*!*[string trimleft [string range $target [string first "!" $target] end] ?^~-_+?]"
if {[string tolower $nick] != [string tolower $botnick]} {
if {![string length [string trim $reas]]} {
set reas "banned by \[${hand}/\002${nik}\002] - Geen reden opgegeven..."} else {
set reas "banned by \[${hand}/\002${nik}\002] - $reas"}
putserv "mode $chn +b $banmask"
putserv "kick $chn $nick $reas"
}
}
|
If someone could take a look please :$
GRTZ |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Sat Jan 28, 2006 9:39 pm Post subject: |
|
|
Try:
| Code: | set target_uhost [getchanhost $nick]
set banmask *!*[lindex [split [maskhost $target_uhost] "!"] 1] |
_________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
|