egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[SOLVED]voice when +mute command
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sun Sep 23, 2007 7:33 pm    Post subject: Reply with quote

Code:
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
   }
  }
 }
}

_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
Fire-Fox
Master


Joined: 23 Sep 2006
Posts: 270
Location: /dev/null

PostPosted: Sun Sep 23, 2007 8:26 pm    Post subject: Reply with quote

Sir_Fz wrote:
Code:
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
Back to top
View user's profile Send private message MSN Messenger
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sun Sep 23, 2007 8:34 pm    Post subject: Reply with quote

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.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
Fire-Fox
Master


Joined: 23 Sep 2006
Posts: 270
Location: /dev/null

PostPosted: Sun Sep 23, 2007 8:40 pm    Post subject: Reply with quote

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 Smile
or els i'll get back Smile
thanks so fare Smile
the chan function like this there is always +m on chan.... Smile so the +m (moderated) will not be toched Smile
_________________
GreatZ
Fire-Fox | Denmark

Scripts: Relay | Store Text | TvMaze
Back to top
View user's profile Send private message MSN Messenger
Fire-Fox
Master


Joined: 23 Sep 2006
Posts: 270
Location: /dev/null

PostPosted: Thu Oct 04, 2007 11:04 am    Post subject: Reply with quote

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 Sad
_________________
GreatZ
Fire-Fox | Denmark

Scripts: Relay | Store Text | TvMaze
Back to top
View user's profile Send private message MSN Messenger
TCL_no_TK
Owner


Joined: 25 Aug 2006
Posts: 509
Location: England, Yorkshire

PostPosted: Fri Oct 05, 2007 3:18 pm    Post subject: Reply with quote

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.
_________________
TCL the misunderstood
Back to top
View user's profile Send private message Send e-mail
Fire-Fox
Master


Joined: 23 Sep 2006
Posts: 270
Location: /dev/null

PostPosted: Sat Oct 06, 2007 8:18 am    Post subject: Reply with quote

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 Smile

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
Back to top
View user's profile Send private message MSN Messenger
TCL_no_TK
Owner


Joined: 25 Aug 2006
Posts: 509
Location: England, Yorkshire

PostPosted: Sat Oct 06, 2007 8:22 pm    Post subject: Reply with quote

You mean in DCC CHAT/telnet with the eggdrop? or in the channel as a /msg #channel -mute | /msg #channel +mute Confused sorry this is alit confussing for me :/
_________________
TCL the misunderstood
Back to top
View user's profile Send private message Send e-mail
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Sat Oct 06, 2007 8:45 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
TCL_no_TK
Owner


Joined: 25 Aug 2006
Posts: 509
Location: England, Yorkshire

PostPosted: Sun Oct 07, 2007 8:18 am    Post subject: Reply with quote

Ok, think this should do it.
Quote:
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. Embarassed i know am not.
_________________
TCL the misunderstood
Back to top
View user's profile Send private message Send e-mail
Fire-Fox
Master


Joined: 23 Sep 2006
Posts: 270
Location: /dev/null

PostPosted: Mon Oct 08, 2007 11:17 am    Post subject: Reply with quote

TCL_no_TK wrote:
Ok, think this should do it.
Quote:
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. Embarassed i know am not.


it does not work when i type +mute nothing happens the same with -mute

Quote:
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
Back to top
View user's profile Send private message MSN Messenger
TCL_no_TK
Owner


Joined: 25 Aug 2006
Posts: 509
Location: England, Yorkshire

PostPosted: Thu Oct 11, 2007 2:45 am    Post subject: Reply with quote

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.
_________________
TCL the misunderstood
Back to top
View user's profile Send private message Send e-mail
Fire-Fox
Master


Joined: 23 Sep 2006
Posts: 270
Location: /dev/null

PostPosted: Fri Oct 12, 2007 2:49 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message MSN Messenger
TCL_no_TK
Owner


Joined: 25 Aug 2006
Posts: 509
Location: England, Yorkshire

PostPosted: Fri Oct 12, 2007 6:58 pm    Post subject: Reply with quote

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.
_________________
TCL the misunderstood
Back to top
View user's profile Send private message Send e-mail
Fire-Fox
Master


Joined: 23 Sep 2006
Posts: 270
Location: /dev/null

PostPosted: Sat Oct 13, 2007 4:59 am    Post subject: Reply with quote

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 Smile like i mute funktion for all users on the chat... Smile

Hope you guys understand Smile
_________________
GreatZ
Fire-Fox | Denmark

Scripts: Relay | Store Text | TvMaze
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber