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.

[SOLVED]voice when +mute command

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
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

bind mode - {% *m} voice:devoice

proc voice:devoice {nick uhost hand chan mc dest} {
 if {$mc == "+m"} {
  foreach n [chanlist $chan] {
   if {[isvoice $n $chan]} { pushmode $chan -v $n }
  }
 } {
  foreach n [chanlist $chan] {
   if {![isvoice $n $chan] && ![isop $n $chan] && ![ishalfop $n $chan]} {
    pushmode $chan +v $n
   }
  }
 }
}
User avatar
Fire-Fox
Master
Posts: 299
Joined: Sat Sep 23, 2006 9:01 pm
Location: /dev/null

Post by Fire-Fox »

Sir_Fz wrote:

Code: Select all

bind mode - {% *m} voice:devoice

proc voice:devoice {nick uhost hand chan mc dest} {
 if {$mc == "+m"} {
  foreach n [chanlist $chan] {
   if {[isvoice $n $chan]} { pushmode $chan -v $n }
  }
 } {
  foreach n [chanlist $chan] {
   if {![isvoice $n $chan] && ![isop $n $chan] && ![ishalfop $n $chan]} {
    pushmode $chan +v $n
   }
  }
 }
}
Do this take all +v when i type +mute ang gives them againg when i type -mute ?
GreatZ
Fire-Fox | Denmark

Scripts: Relay | Store Text | TvMaze
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

No. When someone sets +m, the bot devoices all voices. When someone sets -m, the bot voices all users. If you want it to work on a public command, then you can easily modify it to do so.
User avatar
Fire-Fox
Master
Posts: 299
Joined: Sat Sep 23, 2006 9:01 pm
Location: /dev/null

Post by Fire-Fox »

Sir_Fz wrote:No. When someone sets +m, the bot devoices all voices. When someone sets -m, the bot voices all users. If you want it to work on a public command, then you can easily modify it to do so.
okay let see if i can do it :)
or els i'll get back :)
thanks so fare :)
the chan function like this there is always +m on chan.... :) so the +m (moderated) will not be toched :)
GreatZ
Fire-Fox | Denmark

Scripts: Relay | Store Text | TvMaze
User avatar
Fire-Fox
Master
Posts: 299
Joined: Sat Sep 23, 2006 9:01 pm
Location: /dev/null

Post by Fire-Fox »

did not get it to work so it takes all +voice when i type +mute in chat, and gives them againg when i type -mute in chat :(
GreatZ
Fire-Fox | Denmark

Scripts: Relay | Store Text | TvMaze
User avatar
TCL_no_TK
Owner
Posts: 509
Joined: Fri Aug 25, 2006 7:05 pm
Location: England, Yorkshire

Post by TCL_no_TK »

Its done via mode. So when you do /mode #channel +m it voices everyone. And also when you do /mode #channel -m it devoices everyone.
User avatar
Fire-Fox
Master
Posts: 299
Joined: Sat Sep 23, 2006 9:01 pm
Location: /dev/null

Post by Fire-Fox »

TCL_no_TK wrote:Its done via mode. So when you do /mode #channel +m it voices everyone. And also when you do /mode #channel -m it devoices everyone.
yes but it's the wrong way :)

when i type +mute (command) it shoul remove alle +v and when i type -mute (command) it shell give all users +v again....
GreatZ
Fire-Fox | Denmark

Scripts: Relay | Store Text | TvMaze
User avatar
TCL_no_TK
Owner
Posts: 509
Joined: Fri Aug 25, 2006 7:05 pm
Location: England, Yorkshire

Post by TCL_no_TK »

You mean in DCC CHAT/telnet with the eggdrop? or in the channel as a /msg #channel -mute | /msg #channel +mute :? sorry this is alit confussing for me :/
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Fire-Fox wants a public trigger apparently (although not indicated by initial posts).
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
TCL_no_TK
Owner
Posts: 509
Joined: Fri Aug 25, 2006 7:05 pm
Location: England, Yorkshire

Post by TCL_no_TK »

Ok, think this should do it.
proc pub:-mute {nick host handle channel text} {
if {![botisop $channel]} {return 0}
foreach t [chanlist $channel] {
if {![isvoice $t $channel] && ![isop $t $channel] && ![ishalfop $t $channel] && ![isbotnick $t]} {pushmode $channel -v $t}
}; return 1
}

proc proc:+mute {nick host handle channel text} {
if {![botisop $channel]} {return 0}
foreach t [chanlist $channel] {
if {[isvoice $t $channel] && ![isop $t $channel] && ![ishalfop $t $channel] && ![isbotnick $t]} {pushmode $channel +v $t}
}; return 1
}

bind pub - -mute pub:-mute
bind pub - +mute pub:+mute
It dosen't set [+/-]m on the channel, it just voice's everyone not voiced when you say +mute and it also devoice's everyone voiced when you say -mute. Added the binds as well incase you wasn't sure about them. :oops: i know am not.
User avatar
Fire-Fox
Master
Posts: 299
Joined: Sat Sep 23, 2006 9:01 pm
Location: /dev/null

Post by Fire-Fox »

TCL_no_TK wrote:Ok, think this should do it.
proc pub:-mute {nick host handle channel text} {
if {![botisop $channel]} {return 0}
foreach t [chanlist $channel] {
if {![isvoice $t $channel] && ![isop $t $channel] && ![ishalfop $t $channel] && ![isbotnick $t]} {pushmode $channel -v $t}
}; return 1
}

proc proc:+mute {nick host handle channel text} {
if {![botisop $channel]} {return 0}
foreach t [chanlist $channel] {
if {[isvoice $t $channel] && ![isop $t $channel] && ![ishalfop $t $channel] && ![isbotnick $t]} {pushmode $channel +v $t}
}; return 1
}

bind pub - -mute pub:-mute
bind pub - +mute pub:+mute
It dosen't set [+/-]m on the channel, it just voice's everyone not voiced when you say +mute and it also devoice's everyone voiced when you say -mute. Added the binds as well incase you wasn't sure about them. :oops: i know am not.
it does not work when i type +mute nothing happens the same with -mute
proc pub:+mute {nick host handle channel text} {
if {![botisop $channel]} {return 0}
foreach t [chanlist $channel] {
if {![isvoice $t $channel] && ![isop $t $channel] && ![ishalfop $t $channel] && ![isbotnick $t]} {pushmode $channel -v $t}
}; return 1
}

proc pub:-mute {nick host handle channel text} {
if {![botisop $channel]} {return 0}
foreach t [chanlist $channel] {
if {[isvoice $t $channel] && ![isop $t $channel] && ![ishalfop $t $channel] && ![isbotnick $t]} {pushmode $channel +v $t}
}; return 1
}
bind pub -|- -mute pub:-mute
bind pub -|- +mute pub:+mute
[/quote]
GreatZ
Fire-Fox | Denmark

Scripts: Relay | Store Text | TvMaze
User avatar
TCL_no_TK
Owner
Posts: 509
Joined: Fri Aug 25, 2006 7:05 pm
Location: England, Yorkshire

Post by TCL_no_TK »

There's a few things to check as to why it failed. The bot wasn't opped, everyone is op'd/halfop'd on the channel. Or depending on the [+/-]mute switch everyone was/wasn't voice'd already. Apart from that, the script is complete untested by me and this is only based on what the code is checking.
User avatar
Fire-Fox
Master
Posts: 299
Joined: Sat Sep 23, 2006 9:01 pm
Location: /dev/null

Post by Fire-Fox »

TCL_no_TK wrote:There's a few things to check as to why it failed. The bot wasn't opped, everyone is op'd/halfop'd on the channel. Or depending on the [+/-]mute switch everyone was/wasn't voice'd already. Apart from that, the script is complete untested by me and this is only based on what the code is checking.
Don't get it sorry ...
GreatZ
Fire-Fox | Denmark

Scripts: Relay | Store Text | TvMaze
User avatar
TCL_no_TK
Owner
Posts: 509
Joined: Fri Aug 25, 2006 7:05 pm
Location: England, Yorkshire

Post by TCL_no_TK »

How much testing have you done? The script check's that the people that need giving +v are not:
  • the bot
    have +o
    have +h
    have +v already
or if they need to be given -v then it will also check if they have no voice.
User avatar
Fire-Fox
Master
Posts: 299
Joined: Sat Sep 23, 2006 9:01 pm
Location: /dev/null

Post by Fire-Fox »

TCL_no_TK wrote:How much testing have you done? The script check's that the people that need giving +v are not:
  • the bot
    have +o
    have +h
    have +v already
or if they need to be given -v then it will also check if they have no voice.
Hey why is that i believe that guys are talking the wrong setup here nothing bad at all...


the only thing i need i something that removes +v when i type +mute in the chat and a function that give +v when i type -mute ( pub commands) nothing more or less :) like i mute funktion for all users on the chat... :)

Hope you guys understand :)
GreatZ
Fire-Fox | Denmark

Scripts: Relay | Store Text | TvMaze
Post Reply