This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.
For more information, see this announcement post . Click the X in the top right-corner of this box to dismiss this message.
Old posts that have not been replied to for several years.
ZaKiR
Voice
Posts: 35 Joined: Wed Jun 16, 2004 10:05 pm
Post
by ZaKiR » Sun Jun 27, 2004 10:13 am
i made a code which will kill someone when connecting with a bad nick... but don`t know why this is not working
Code: Select all
set killnicks {
"*dick*"
"nick2"
"nick3"
}
set killreason "\00304Réason: \00301\037B\037\00314ad \00301\037N\037\00314ick \00301\037D\037\00314étéctéd\003"
bind raw - NOTICE client:connect
proc client:connect {from keyword args} {
global killnicks killreason
if {[string match "*Client connecting*" $args]} {
set usernick [lindex [split $args] 9]
foreach nick $killnicks {
if {[string equal -nocase $nick $usernick]} {
putserv "KILL $nick :$killreason"
break
}
}
}
}
I think, may be the following line is not appropriate here
i need some help with that... thanks in advance
KrzychuG
Master
Posts: 306 Joined: Sat Aug 16, 2003 2:51 pm
Location: Torun, Poland
Contact:
Post
by KrzychuG » Sun Jun 27, 2004 10:55 am
Your bot has opper status on that server?
Que?
ZaKiR
Voice
Posts: 35 Joined: Wed Jun 16, 2004 10:05 pm
Post
by ZaKiR » Sun Jun 27, 2004 11:17 am
Of couser my bot has oper access
ZaKiR
Voice
Posts: 35 Joined: Wed Jun 16, 2004 10:05 pm
Post
by ZaKiR » Sun Jun 27, 2004 11:42 am
actually this code is working but....
if someone comes with nick 'hell' it works.. but if someone comes with nick 'sdhellsd' it doesn`t work..
greenbear
Owner
Posts: 733 Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway
Post
by greenbear » Sun Jun 27, 2004 11:55 am
First, don't use bold text unless its necessary.
Replace this line:
Code: Select all
if {[string equal -nocase $nick $usernick]} {
with this:
Code: Select all
if {[string match -nocase *$nick* $usernick]} {
and you only need "hell" listed in killnicks
DarkJFMan
Halfop
Posts: 85 Joined: Mon Dec 15, 2003 3:19 pm
Post
by DarkJFMan » Sun Jun 27, 2004 11:59 am
Not sure if this might work, but also try
ZaKiR
Voice
Posts: 35 Joined: Wed Jun 16, 2004 10:05 pm
Post
by ZaKiR » Sun Jun 27, 2004 12:22 pm
Code: Select all
set killnicks {
"hell"
}
set killreason "\00304Réason: \00301\037B\037\00314ad \00301\037N\037\00314ick \00301\037D\037\00314étéctéd\003"
bind raw - NOTICE client:connect
proc client:connect {from keyword args} {
global killnicks killreason
if {[string match "*Client connecting*" $args]} {
set usernick [lindex [split $args] 9]
foreach nick $killnicks {
if {[string match -nocase *$nick* $usernick]} {
putserv "KILL $nick :$killreason"
break
}
}
}
}
It's working for nick 'hell' but not working for nick 'hell123'
but if i change it to
then it doesn`t work for 'hell' and 'hell123' both
awyeah
Revered One
Posts: 1580 Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:
Post
by awyeah » Sun Jun 27, 2004 3:36 pm
I'd say this code should work for anything matching
the words:
dgdsgdhelldgfdgfdg
shell
gotohellloser
lamersinhell
And so on because wildcards are on
both sides of the string match *badword*
Because the words are specificed as *hell*
so there for any match on both left and right
hand sides will give results.
Code: Select all
set killnicks {
"hell"
"loser"
"dick"
"bitch"
}
set killreason "\00304Réason: \00301\037B\037\00314ad \00301\037N\037\00314ick \00301\037D\037\00314étéctéd\003"
bind raw - NOTICE client:connect
proc client:connect {from keyword args} {
global killnicks killreason
if {[string match -nocase "*client connecting*" $args]} {
set usernick [lindex [split $args] 9]
foreach badnick $killnicks {
if {[string match -nocase *$badnick* $usernick]} {
putserv "KILL $badnick :$killreason"
return 0
}
}
}
}
·awyeah·
==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
ZaKiR
Voice
Posts: 35 Joined: Wed Jun 16, 2004 10:05 pm
Post
by ZaKiR » Sun Jun 27, 2004 3:54 pm
Code: Select all
set killnicks {
"hell"
"loser"
"dick"
"bitch"
}
set killreason "\00304Réason: \00301\037B\037\00314ad \00301\037N\037\00314ick \00301\037D\037\00314étéctéd\003"
bind raw - NOTICE client:connect
proc client:connect {from keyword args} {
global killnicks killreason
if {[string match -nocase "*client connecting*" $args]} {
set usernick [lindex [split $args] 9]
foreach badnick $killnicks {
if {[string match -nocase *$badnick* $usernick]} {
putserv "KILL $badnick :$killreason"
return 0
}
}
}
}
this code this totally not working... i used nick like 'hell' 'ashellas' ... but this code this not working
ZaKiR
Voice
Posts: 35 Joined: Wed Jun 16, 2004 10:05 pm
Post
by ZaKiR » Sun Jun 27, 2004 4:57 pm
Code: Select all
set killnicks {
"% *hell*"
"% *dick*"
"% *bitch*"
}
set killreason "\00304Réason: \00301\037B\037\00314ad \00301\037N\037\00314ick \00301\037D\037\00314étéctéd\003"
bind raw - NOTICE client:connect
proc client:connect {from keyword args} {
global killnicks killreason
if {[string match -nocase "*client connecting*" $args]} {
set usernick [lindex [split $args] 9]
foreach badnick $killnicks {
if {[string match -nocase *$badnick* $usernick]} {
putserv "KILL $badnick :$killreason"
return 0
}
}
}
}
this is not working also
awyeah
Revered One
Posts: 1580 Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:
Post
by awyeah » Sun Jun 27, 2004 4:59 pm
You dont need to set the characters % or * in your wordlist.
Just set your words in between quotation marks after spaces or in new lines.
The string matching procedure has *'s on both sides, so its
useless to use those.
·awyeah·
==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
DarkJFMan
Halfop
Posts: 85 Joined: Mon Dec 15, 2003 3:19 pm
Post
by DarkJFMan » Sun Jun 27, 2004 6:04 pm
and also make sure you put that script in a new file, because if you have too many scripts on same file, they'll interact causing others to crash.
user
Posts: 1452 Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway
Post
by user » Mon Jun 28, 2004 12:55 am
DarkJFMan wrote: and also make sure you put that script in a new file, because if you have too many scripts on same file, they'll interact causing others to crash.
Putting the code in a new file makes no difference what so ever unless you source the resulting file into another interpreter/namespace.
Have you ever read "The Manual"?
Alchera
Revered One
Posts: 3344 Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:
Post
by Alchera » Mon Jun 28, 2004 2:29 am
Code: Select all
set killnicks {
*hell*
*dick*
*bitch*
}
Try this?
Add [SOLVED] to the thread title if your issue has been.
Search |
FAQ |
RTM