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.

Stupid pushmode

Support & discussion of released scripts, and announcements of new releases.
Post Reply
E
Ecimo
Voice
Posts: 5
Joined: Tue Dec 27, 2005 10:19 am

Stupid pushmode

Post by Ecimo »

Bug 1:
the proc demute is the problem can some help me there?
«11:15:43» {@Mulle^:#game-fair.dk} !mute l0rn|Mortar^off l0rn|RR^Off
«11:15:44» « Mode » {[Game-Fair]} sets {-vv l0rn|Mortar^off l0rn|RR^Off}
«11:17:43» « Mode » {[Game-Fair]} sets {+v l0rn|Mortar^off}

Code: Select all

set mutedhosts "" 

bind join -|- * myavoice 
bind PUB -|- !mute mymute 
bind PUB -|- !demute demute2 

proc myavoice {n u h c} { 
  if {![string equal -nocase $c "#game-fair.dk"]} {return} 
  global mutedhosts 
  if {[lsearch -exact $mutedhosts $u] == -1} { 
    pushmode $c +v $n 
  } else { puthelp "PRIVMSG $c :\002$n\002 (\002*!*$u\002) have been a bad boy, You have to wait 2 mins." } 
}

proc mymute {n u h c a} { 
  if {![string equal -nocase $c "#game-fair.dk"] || ![isop $n $c]} {return} 
  global mutedhosts 
  foreach v [split $a] { 
    if {[onchan $v $c]} { 
      lappend mutedhosts [set uh [getchanhost $v $c]] 
      pushmode $c -v $v 
      utimer 120 [list demute $v $uh $c] 
    } 
  } 
} 

proc demute2 {n u h c a} { 
  if {![string equal -nocase $c "#game-fair.dk"] || ![isop $n $c] || ![onchan $a $c]} {return} 
  foreach v [split $a] { 
  demute $v [getchanhost $v $c] $c 
  } 
} 

proc demute {n h c} { 
  global mutedhosts 
  if {[set pos [lsearch -exact $mutedhosts $h]] == -1} {return} 
  while {[set pos [lsearch -exact $mutedhosts $h]] != -1} { 
    set mutedhosts [lreplace $mutedhosts $pos $pos]] 
  } 
  if {[onchan $n $c]} { 
    pushmode $c +v $n 
    } { 
    foreach curuser [chanlist $c] { 
      if {[getchanhost $curuser] == $h && ![isvoice $curuser $c]} {pushmode $c +v $curuser} 
    } 
  } 
}
s
spock
Master
Posts: 319
Joined: Thu Dec 12, 2002 8:40 pm

Post by spock »

do they by any chance have the same u@h ?
photon?
Post Reply