egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

help with ban

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
dusk
Halfop


Joined: 06 Mar 2005
Posts: 91
Location: Belgium

PostPosted: Sat Jan 28, 2006 9:07 pm    Post subject: help with ban Reply with quote

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
View user's profile Send private message MSN Messenger
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Sat Jan 28, 2006 9:39 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber