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 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
Fire-Fox
Master


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

PostPosted: Thu Sep 20, 2007 7:56 pm    Post subject: [SOLVED]voice when +mute command Reply with quote

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:
#################
##   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   ##
#############

_________________
GreatZ
Fire-Fox | Denmark

Scripts: Relay | Store Text | TvMaze


Last edited by Fire-Fox on Mon Jun 24, 2013 7:20 am; edited 3 times in total
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 Sep 20, 2007 10:29 pm    Post subject: Re: voice when +mute command Reply with quote

try
Code:
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.
_________________
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 Sep 21, 2007 8:27 am    Post subject: Re: voice when +mute command [SOLVED ] Reply with quote

TCL_no_TK wrote:
try
Code:
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 Smile

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

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 Smile

there that is what i need Smile
_________________
GreatZ
Fire-Fox | Denmark

Scripts: Relay | Store Text | TvMaze


Last edited by Fire-Fox on Thu Oct 18, 2007 4:45 pm; edited 2 times in total
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 Sep 21, 2007 6:42 pm    Post subject: RE: Re: voice when +mute command Reply with quote

gotcha, then
Code:
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.
_________________
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 Sep 21, 2007 9:09 pm    Post subject: Re: RE: Re: voice when +mute command Reply with quote

TCL_no_TK wrote:
gotcha, then
Code:
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 Smile

But i have another question, maybe we can solved that in privat Very Happy 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 Sad 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 Smile if you decide to take the task Smile

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

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

thanks so fare Smile
_________________
GreatZ
Fire-Fox | Denmark

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


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

PostPosted: Fri Sep 21, 2007 9:32 pm    Post subject: Re: RE: Re: voice when +mute command Reply with quote

Fire-Fox wrote:
But i have another question, maybe we can solved that in privat Very Happy 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
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: Sat Sep 22, 2007 8:26 am    Post subject: Re: RE: Re: voice when +mute command Reply with quote

Alchera wrote:
Fire-Fox wrote:
But i have another question, maybe we can solved that in privat Very Happy 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
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: Sat Sep 22, 2007 11:08 am    Post subject: Re: RE: Re: voice when +mute command Reply with quote

TCL_no_TK wrote:
gotcha, then
Code:
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
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 Sep 22, 2007 10:49 pm    Post subject: RE: Re: RE: Re: voice when +mute command Reply with quote

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


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sun Sep 23, 2007 6:08 am    Post subject: Reply with quote

Use [pushmode] to set modes, it allows Eggdrop to stack as much modes in one line before it dumps them to server.
_________________
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 11:12 am    Post subject: Reply with quote

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:
putserv "MODE $channel +v $t"


to

Code:
pushmode "MODE $channel +v $t"

_________________
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 1:24 pm    Post subject: Reply with quote

Yes, but the correct syntax is
Code:
pushmode $channel +v $t

_________________
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 1:47 pm    Post subject: Reply with quote

Sir_Fz wrote:
Yes, but the correct syntax is
Code:
pushmode $channel +v $t


Thanks alot pepz

can you run thought it to see if it's done right Very Happy

P.S: can i remove the:
Code:
 putserv "MODE $channel +m"

i have no use to it in the code i just click moderated manuel Smile
the script shell only take +v and give +voice then nedded Smile

Code:
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
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 3:20 pm    Post subject: Reply with quote

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.
_________________
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 3:44 pm    Post subject: Reply with quote

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 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 1, 2, 3  Next
Page 1 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