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
Fire-Fox
Master
Posts: 299
Joined: Sat Sep 23, 2006 9:01 pm
Location: /dev/null

[SOLVED]voice when +mute command

Post by Fire-Fox »

i have a script i would like some remod on hehe

let's say this:

+mute the chan in "moderated mode"
- an gives +v (voice) to everybody on chan.

-mute take the autovoice
- BUT the moderated function is still on soo the users can't write

Code: Select all

#################
##   Lock Chan ##
################
proc proc_lc { nick uhost hand chan args } {
  putquick "PRIVMSG $chan :Locking Channel"
  putquick "MODE $chan +m"
}

proc proc_uc { nick uhost hand chan args } {
  putquick "PRIVMSG $chan :UnLocking Channel"
  putquick "MODE $chan -m"
}
##############
##   End   ##
#############
Last edited by Fire-Fox on Mon Jun 24, 2013 7:20 am, edited 3 times in total.
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

Re: voice when +mute command

Post by TCL_no_TK »

try

Code: Select all

proc pub:mute {nick host handle channel text} {
 set mchk [getchanmode $channel]
  if {![botisop $channel]} {return 0}
   if {[string match "*m*" "$mchk"]} {
    unbind join - "* *" join:vonm
     putserv "NOTICE $nick :no longer auto voicing people when +m is set"
      pushmode $channel -m
       return 1
   } else {
    bind join "* *" join:vonm
      putserv "NOTICE $nick :now auto voicing people as +m is set"
       pushmode $channel +m
         return 1
   }
}

proc join:vonm {nick host handle channel} {
 if {![botisop $channel]} {return 0}
  set mchk [getchanmode $channel]
   if {[string match "*m*" "$mchk"]} {
    pushmode $channel +v $nick
     return
   }
}

bind pub mute pub:mute
Somthing like this should do it, and plus it dosen't need the +mute -mute, only needs a pub mute.
User avatar
Fire-Fox
Master
Posts: 299
Joined: Sat Sep 23, 2006 9:01 pm
Location: /dev/null

Re: voice when +mute command [SOLVED ]

Post by Fire-Fox »

TCL_no_TK wrote:try

Code: Select all

proc pub:mute {nick host handle channel text} {
 set mchk [getchanmode $channel]
  if {![botisop $channel]} {return 0}
   if {[string match "*m*" "$mchk"]} {
    unbind join - "* *" join:vonm
     putserv "NOTICE $nick :no longer auto voicing people when +m is set"
      pushmode $channel -m
       return 1
   } else {
    bind join "* *" join:vonm
      putserv "NOTICE $nick :now auto voicing people as +m is set"
       pushmode $channel +m
         return 1
   }
}

proc join:vonm {nick host handle channel} {
 if {![botisop $channel]} {return 0}
  set mchk [getchanmode $channel]
   if {[string match "*m*" "$mchk"]} {
    pushmode $channel +v $nick
     return
   }
}

bind pub mute pub:mute
Somthing like this should do it, and plus it dosen't need the +mute -mute, only needs a pub mute.
Thanks for it but it's not enterily what im looking for...
i will like to keep the "+/- mute" funktion :)

i think i have filled you with bad info sorry about that mate :)

the thing im after is a funktion that if i push +mute it takes all +v on chan and when i push -mute it gives all +v to all on chan :)

there that is what i need :)
Last edited by Fire-Fox on Thu Oct 18, 2007 4:45 pm, edited 2 times in total.
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

RE: Re: voice when +mute command

Post by TCL_no_TK »

gotcha, then

Code: Select all

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

proc pub:-mute {nick host handle channel text} {
 if {![botisop $channel]} {return 0}
  putserv "MODE $channel -m"
   foreach t [chanlist $channel] {
    if {[isvoice $t $channel]} {
     putserv "MODE $channel -v $t"
    }
   }; return 1
}
hope its right this time.
User avatar
Fire-Fox
Master
Posts: 299
Joined: Sat Sep 23, 2006 9:01 pm
Location: /dev/null

Re: RE: Re: voice when +mute command

Post by Fire-Fox »

TCL_no_TK wrote:gotcha, then

Code: Select all

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

proc pub:-mute {nick host handle channel text} {
 if {![botisop $channel]} {return 0}
  putserv "MODE $channel -m"
   foreach t [chanlist $channel] {
    if {[isvoice $t $channel]} {
     putserv "MODE $channel -v $t"
    }
   }; return 1
}
hope its right this time.
Hey thanks i'll test it in the morning :)

But i have another question, maybe we can solved that in privat :D it's something about shoutcast.tcl and the isop function i need added to the setdj part and some other places i have got some other answers to the shoiutcast.tcl from here too, but they did not work as good :( sorry to say guess that have helped me quite some times now BIG thanks....

but if you could run it though i will be happy, i'll post it when i see a replay from you :) if you decide to take the task :)

sorry about the language im danish :) and the script is for a danish online netstation :)

im off now but i'll step by here later today :)

thanks so fare :)
GreatZ
Fire-Fox | Denmark

Scripts: Relay | Store Text | TvMaze
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Re: RE: Re: voice when +mute command

Post by Alchera »

Fire-Fox wrote:But i have another question, maybe we can solved that in privat :D it's something about shoutcast.tcl and the isop function
It is proper etiquette to contact the original author FIRST (as you were already told here).

His email address: domsen@domsen.org

IRC: #newsticker@ircnet

It's apparent you've made no effort and are simply trying to circumvent.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
Fire-Fox
Master
Posts: 299
Joined: Sat Sep 23, 2006 9:01 pm
Location: /dev/null

Re: RE: Re: voice when +mute command

Post by Fire-Fox »

Alchera wrote:
Fire-Fox wrote:But i have another question, maybe we can solved that in privat :D it's something about shoutcast.tcl and the isop function
It is proper etiquette to contact the original author FIRST (as you were already told here).

His email address: domsen@domsen.org

IRC: #newsticker@ircnet

It's apparent you've made no effort and are simply trying to circumvent.
Got damn...

i have tryed long time ago to sent mail to him etc.... there is no contact what so ever!
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

Re: RE: Re: voice when +mute command

Post by Fire-Fox »

TCL_no_TK wrote:gotcha, then

Code: Select all

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

proc pub:-mute {nick host handle channel text} {
 if {![botisop $channel]} {return 0}
  putserv "MODE $channel -m"
   foreach t [chanlist $channel] {
    if {[isvoice $t $channel]} {
     putserv "MODE $channel -v $t"
    }
   }; return 1
}
hope its right this time.
Can it be done so the bot only takes few linies insted of spamming the chat with every person it devoices ?
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

RE: Re: RE: Re: voice when +mute command

Post by TCL_no_TK »

Its possible. However, there are limits on how many modes per line is allowed by the ircd. So not everyone will get voiced, i've tryed to find a why around this myself. The easyest way is simple to just repeat sending the +v's and the nicks that need voicing to the server untill everyone has a voice on the channel. So it trys to fit them all in at once, but this usually ends up flooding if not done right or in this case would probably leave a few people without voice. Eggdrop's modes per line is currently 6 mpl. This is usally the best thing as many servers will double there modes per line as half are for sync or net join i belive.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Use [pushmode] to set modes, it allows Eggdrop to stack as much modes in one line before it dumps them to server.
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:Use [pushmode] to set modes, it allows Eggdrop to stack as much modes in one line before it dumps them to server.
So what you are saying is that i only need to correct this

Code: Select all

putserv "MODE $channel +v $t" 
to

Code: Select all

pushmode "MODE $channel +v $t"
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 »

Yes, but the correct syntax is

Code: Select all

pushmode $channel +v $t
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:Yes, but the correct syntax is

Code: Select all

pushmode $channel +v $t
Thanks alot pepz

can you run thought it to see if it's done right :D

P.S: can i remove the:

Code: Select all

 putserv "MODE $channel +m"
i have no use to it in the code i just click moderated manuel :)
the script shell only take +v and give +voice then nedded :)

Code: Select all

proc proc_lc {nick host handle channel text} {
 if {![botisop $channel]} {return 0}
  putserv "MODE $channel +m"
   foreach t [chanlist $channel] {
    if {![isvoice $t $channel] && ![isop $t $channel] && ![ishalfop $t $channel]} {
     pushmode $channel -v $t"
    }
   }; return 1
}

proc proc_uc {nick host handle channel text} {
 if {![botisop $channel]} {return 0}
  putserv "MODE $channel -m"
   foreach t [chanlist $channel] {
    if {[isvoice $t $channel]} {
     pushmode $channel +v $t"
    }
   }; return 1
}
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 »

You're doing it vice-versa. You're devoicing users that are NOT voiced in the first proc and voicing users that already ARE voiced in the 2nd proc.
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:You're doing it vice-versa. You're devoicing users that are NOT voiced in the first proc and voicing users that already ARE voiced in the 2nd proc.
yes

the thing im after is a funktion that if i push +mute it takes all +v on chan and when i push -mute it gives all +v to all on chan

that is what it's doing now i believe :)
GreatZ
Fire-Fox | Denmark

Scripts: Relay | Store Text | TvMaze
Post Reply