nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Sat Sep 03, 2011 10:31 am Post subject: |
|
|
I assume you've arranged for your eggdrop to have Irc Op Privileges on the server, and that your eggdrop indeed attains these privileges (using hte OPER command)?
For starters, do you see any errors on your partyline console or logfiles?
Next, don't use list commands (such as lindex) on strings. In this case, use the split command to break the string into a proper list.
| Code: | | set killnick [lindex [split $arg] 2] |
Also, I probably wouldn't use multiple regular expressions in this case, as you aren't really using any patterns or such. A list of approved nicks and an lsearch would be faster, and alot easier to maintain... (although I have to use string tolower to make the matching case-insensitive). This is not related to your problem though.
| Code: | set approved [list \
"somenick" \
"othersick" \
"theguy" \
"on3nick" \
]
proc connect:chk {nick host handle channel text} {
set killnick [lindex [split $text] 2]
if {[lsearch -exact $::approved [string tolower $killnick]] >= 0} {
puthelp "PRIVMSG #chan :$killnick has passed the authorized Connection"
} else {
putserv "KILL $killnick :You are not authorized to connect to this server"
}
} |
_________________ NML_375, idling at #eggdrop@IrcNET |
|