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.

voicing users in list when bot is last who joined..

Old posts that have not been replied to for several years.
Locked
k
kublador
Voice
Posts: 21
Joined: Sun May 25, 2003 1:25 pm

voicing users in list when bot is last who joined..

Post by kublador »

how can i do this?
because when the bot is the first joined and the users in the userlist joined.. it voices automatically..
but when the users in the userlist are already in the channel and the eggdrop bot lastly joined..
it doesnt voices the users that are there before the bot joined even if they are in the userlist..
can someone help me?
thank you
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Code: Select all

bind join * my:join

proc my:join {nick uhost hand chan} {
  if {[strlwr $nick] != [strlwr $::botnick]} {
    return
  }
  utimer 15 [list give:voice $chan]
}

proc give:voice {chan} {
  if {![botisop $chan]} {
    return
  }
  foreach user [chanlist $chan] {
    if {[strlwr $user] == [strlwr $::botnick] || [isvoice $user $chan] [isop $user $chan] || ![matchattr [nick2hand $user] of|of $chan]} {
      continue
    }
    pushmode $chan +v user
  }
}
Once the game is over, the king and the pawn go back in the same box.
k
kublador
Voice
Posts: 21
Joined: Sun May 25, 2003 1:25 pm

Post by kublador »

thanks... how can i run this? is there something i need to type in the channel to voice everyone in the userlist that has +B flag?

how bout everyone that has no voice even if it s not in the userlist?
thank you very much ;)
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

First copy/paste the code I've posted in a file named how you wish .tcl (eg. bla.tcl) then load it to your eggdrop. For a channel command use the folowing code to voice friends (marked with +B flag):

Code: Select all

bind pub o !fvoice pub:fvoice

proc pub:fvoice {nick host hand chan text} {
  foreach user [chanlist $chan] { 
    if {[strlwr $user] == [strlwr $::botnick] || [isvoice $user $chan] [isop $user $chan] || ![matchattr [nick2hand $user] |B $chan]} { 
      continue 
    } 
    pushmode $chan +v user 
  }
}
and this one for all the channel users:

Code: Select all

bind pub o !avoice pub:avoice

proc pub:avoice {nick host hand chan text} {
  foreach user [chanlist $chan] { 
    if {[strlwr $user] == [strlwr $::botnick] || [isvoice $user $chan] [isop $user $chan]} { 
      continue 
    } 
    pushmode $chan +v user 
  }
}
Once the game is over, the king and the pawn go back in the same box.
k
kublador
Voice
Posts: 21
Joined: Sun May 25, 2003 1:25 pm

Post by kublador »

kewl! thanks ;) God bless
Locked