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.

voice ppl with a certan nick

Old posts that have not been replied to for several years.
Locked
K
Kimmi
Halfop
Posts: 58
Joined: Thu Jul 24, 2003 4:17 pm
Location: Norway
Contact:

voice ppl with a certan nick

Post by Kimmi »

I was looking in the tcl-archive but couldnt find any script that did what I where looking for.

Im looking for a script that auto voice ppl that has a certan nick and devoice them when they change their nick to something else..
Like:
* dude1 is now known as AAA|boy
* dude2 is now known as AAA|man
|Bot| sets mode: +v AAA|boy
|Bot| sets mode: +v AAA|man

AND if:
* AAA|boy is now known as eggy
* AAA|man is now known as eggi
|Bot| sets mode: -v eggy
|Bot| sets mode: -v eggi

Here the bots looks for "AAA" in the nick

Anyone know of such a script... any hard to make???
Kimmi@EFnet
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

Try this

Code: Select all

bind nick - * check:nicks
proc check:nicks {nick host hand chan nnick} {
  if {[string match "AAA|*" $nnick] && ![isvoice $nnick $chan]} {
    pushmode $chan +v $nnick
  } elseif {[string match "AAA|*" $nick] && [isvoice $nnick $chan]} {
    pushmode $chan -v $nnick
  }
}
Elen sila lúmenn' omentielvo
K
Kimmi
Halfop
Posts: 58
Joined: Thu Jul 24, 2003 4:17 pm
Location: Norway
Contact:

Post by Kimmi »

thanx :)
and if I only want it to work in one spesic chan...
I added:
set voice_chan "#chan"
and
if {$voice_chan != $chan}

didnt work... :cry:
U know whats wrong...

Code: Select all

set voice_chan "#chan"
bind nick - * check:nicks 
proc check:nicks {nick host hand chan nnick} { 
  if {$voice_chan != $chan}
  if {[string match "AAA|*" $nnick] && ![isvoice $nnick $chan]} { 
    pushmode $chan +v $nnick 
  } elseif {[string match "AAA|*" $nick] && [isvoice $nnick $chan]} { 
    pushmode $chan -v $nnick 
  } 
}
Kimmi@EFnet
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Code: Select all

set voice_chan "#chan" 
bind nick - * check:nicks 
proc check:nicks {nick host hand chan nnick} { 
  if {[string tolower $chan] == [string tolower $::voice_chan]} { 
  if {[string match "AAA|*" $nnick] && ![isvoice $nnick $chan]} { 
    pushmode $chan +v $nnick 
  } elseif {[string match "AAA|*" $nick] && [isvoice $nnick $chan]} { 
    pushmode $chan -v $nnick 
  } 
 }
}
K
Kimmi
Halfop
Posts: 58
Joined: Thu Jul 24, 2003 4:17 pm
Location: Norway
Contact:

Post by Kimmi »

thanx.... it works great
Kimmi@EFnet
User avatar
Souperman
Halfop
Posts: 69
Joined: Sat Feb 02, 2002 8:00 pm
Location: Cape Town, South Africa
Contact:

Post by Souperman »

You might want to use 'string match -nocase ...' to make sure it's case insensitive. ;)
Quick! Somebody get me a new ink cartridge
Locked