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.

my tcl script adds users on every split :|

Old posts that have not been replied to for several years.
Locked
User avatar
FIDe`
Voice
Posts: 32
Joined: Fri Feb 21, 2003 5:41 am
Location: Naples, Italy

my tcl script adds users on every split :|

Post by FIDe` »

Hi all,
I have written a tcl script that makes a simple function: if someone changes the +l on a chan or removes it, he gets +d and kicked ; and if he's not added on the botnet, he's added with +d flags.
But there's a problem: on every split, the bot adds an user with +d flag, like:
(bot): | *!irc.cs.
(bot): | *!irc.cs.
(bot): | *!irc.cs.
(bot): | *!irc.ee.
(bot): | *!irc.ee.
(bot): | *!irc.ee.


here's a proc:

Code: Select all

proc remove_limit_mode {nick uhost hand chan mode victim} {

global lamorhand fidenet hubbot

 if {$mode == "-l" && ![string match "*.*" $nick]} {
  if {!(([matchattr $hand +o]) && ([matchattr $hand +b] || [matchattr $hand +n] || [matchattr $hand +b]))} {
  if {[lsearch -exact [ channel info $chan ] "+noremovelimit" ] == -1} {return 0}
   if {[isbotnetnick $hubbot]} {
   dccbroadcast "MODIFICA NON AUTORIZZATA DEL LIMITE SU $chan DA PARTE DI $nick!$uhost ($lamorhand)"
   }
   set lamorhand [nick2hand $nick]
   if {![validuser $lamorhand]} {
   adduser $nick *!$uhost
   chattr $nick |-ofmn $chan
   chattr $nick |+dk $chan
   }
   chattr $lamorhand |+dk $chan
   putquick "MODE $chan -o+b+l $nick *!*$uhost 1"
   putquick "KICK $chan $nick :no no,lame!"
  }
 }
}
I was thinking that
if {$mode == "-l" && ![string match "*.*" $nick]} {
was a good way to block such behaviour... but it doesn't worked.
Any help?
thanks all
User avatar
slennox
Owner
Posts: 593
Joined: Sat Sep 22, 2001 8:00 pm
Contact:

Post by slennox »

I'm not sure why your string match wouldn't work if the server name has a "." in it, but try "[onchan $nick $chan]" instead and see if that works.
Locked