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 

Auto Voice & Devoice!
Goto page 1, 2  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
i_m_offline
Voice


Joined: 18 Jun 2005
Posts: 21

PostPosted: Sun Jun 19, 2005 11:54 am    Post subject: Auto Voice & Devoice! Reply with quote

Hello friends,

Can I get an tcl script which does following:

Voice users on x number of lines said in main channel
Devoice user upon being idle in channel for x minuts (idle time in channel, not on server)

Couldn't find setisfying script on google and on site so asking here. Thanking in advance Very Happy

i_m_offline
Back to top
View user's profile Send private message Send e-mail MSN Messenger
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Sun Jun 19, 2005 12:21 pm    Post subject: Reply with quote

Code:

set num 10 ;# lines
set idle 5 ;# minutes
bind pubm - * foo
bind time - * bar
proc foo {n u h c t} {
   if [info exists ::user($n)] {
      if {[incr ::user($n)] >= $::num && ![isvoice $n $c]} {
         pushmode $c +v $n
      }
   } {
      set ::user($n) 1
   }
}
proc bar {m h d mo y} {
   foreach c [channels] {
      foreach n [chanlist $c] {
         if {[isvoice $n $c] && [getchanidle $n $c] >= $::idle} {
            pushmode $c -v $n
         }
      }
   }
}
Back to top
View user's profile Send private message Visit poster's website
i_m_offline
Voice


Joined: 18 Jun 2005
Posts: 21

PostPosted: Sun Jun 19, 2005 4:07 pm    Post subject: Thanks Reply with quote

Ohhh thats so kind of u demond! Thanks alot.

Sorrie for asking for more but is it possible to add any nick in exempt list so that they dont get voiced in channel, whatever number of lines they use. THanks once more

just to make it more specific
set num 10 ;# lines
set idle 5 ;# minutes

YOu here 10 lines and 5 min is idle time, and I can change it to whatever I want ?

THanks

i_m_offline
Back to top
View user's profile Send private message Send e-mail MSN Messenger
i_m_offline
Voice


Joined: 18 Jun 2005
Posts: 21

PostPosted: Sun Jun 19, 2005 4:11 pm    Post subject: One more thing! Reply with quote

How often it will check for idle users ?
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sun Jun 19, 2005 6:08 pm    Post subject: Re: One more thing! Reply with quote

i_m_offline wrote:
How often it will check for idle users ?

Every minute
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
i_m_offline
Voice


Joined: 18 Jun 2005
Posts: 21

PostPosted: Tue Jun 21, 2005 3:10 am    Post subject: Thanks Demond Reply with quote

The code is working perfectly all right, its just if you can add lil more in it where I can exempt few nicks from getting voiced. Thanks once more Very Happy

Just to ask u, when v define x number of lines said in channel, would get voiced, so these x number of lines has some time limit ? like 10 lines in 15 min then voiced or somthing ? o/w if a user get voice for saying 100 lines in 3 days then :s sounds lil tricky. thanks again mate Smile
Back to top
View user's profile Send private message Send e-mail MSN Messenger
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Tue Jun 21, 2005 4:21 am    Post subject: Reply with quote

for an except list, you better use user-defined flag, for example A:

Code:

proc foo {n u h c t} {
   if [matchattr $h A] return
...


then add nicks/hostmask you don't want voiced to a user record chattr'ed +A

as of the line counting timelimit, there is none (and I am too lazy to implement one for you)
Back to top
View user's profile Send private message Visit poster's website
i_m_offline
Voice


Joined: 18 Jun 2005
Posts: 21

PostPosted: Tue Jun 21, 2005 5:47 am    Post subject: Reply with quote

All right Demond, that was a gr8 help too Smile appreciated, I shall wait for u to feel relax then I might have that Smile so I will be looking into mypost for the response. I feel if there is no time limit defined then the purpose of it may not give the right results. I would request if it can be set by user, would like more friendly, like anyone can define x many lines in x minutes then voiced. Smile
Author -> "demond"

hahaha :p ok no buttering Smile

Have a nice time all, will be looking after for the update Smile thanks

i_m_offline
DALnet
Back to top
View user's profile Send private message Send e-mail MSN Messenger
i_m_offline
Voice


Joined: 18 Jun 2005
Posts: 21

PostPosted: Tue Jun 21, 2005 11:45 am    Post subject: Reply with quote

daym mate, the script is voicing a person on one line itself when that person joins next, because it doesn't clear the variable (I think) and its voicing even to OPs Sad can u please sort this out? thanks Smile

i_m_offline
Back to top
View user's profile Send private message Send e-mail MSN Messenger
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Tue Jun 21, 2005 12:03 pm    Post subject: Reply with quote

no, I won't fix the script, so stop asking already

IMO, it's fair to remember the number of lines for a nick between joins - that is, for a reasonable amount of time - and if you want that purged after certain amount of time, implement it yourself - I don't develop scripts which serve no sane purpose - and this script is such a script - since voicing users on a channel that is not +m is a pure vanity (and lameness)
Back to top
View user's profile Send private message Visit poster's website
i_m_offline
Voice


Joined: 18 Jun 2005
Posts: 21

PostPosted: Tue Jun 21, 2005 12:08 pm    Post subject: Reply with quote

eh ok :s Sad
Thanks for whatever u did Smile
Back to top
View user's profile Send private message Send e-mail MSN Messenger
dohko2006
Voice


Joined: 19 Mar 2006
Posts: 8

PostPosted: Sun Mar 26, 2006 2:13 pm    Post subject: Reply with quote

sorry for open past topic, but and try to modify myfelf and get errors.
i try only devoice inactive voices (delay from server), but protect +g and +f

my code
Code:

set idle 30 ;# minutes

bind time - * bar

proc bar {m h d mo y handle} {
   foreach c [channels] {
      foreach n [chanlist $c] {
         if { ![matchattr $handle gf] && [isvoice $n $c] && [getchanidle $n $c] >= $::idle} {
            pushmode $c -v $n
         }
      }
   }
}


and always have this error:

Code:
Tcl error [bar]: wrong # args: should be "bar m h d mo y handle"


add, its possible modify check intervals of delay (now its every minute) to every 5mins per example?

Regards Smile
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sun Mar 26, 2006 9:10 pm    Post subject: Reply with quote

Try
Code:
set idle 30 ;# minutes

bind time - * bar

proc bar args {
   foreach c [channels] {
      foreach n [chanlist $c] {
         set handle [nick2hand $n $c]
         if {![matchattr $handle gf] && [isvoice $n $c] && [getchanidle $n $c] >= $::idle} {
            pushmode $c -v $n
         }
      }
   }
}

_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
dohko2006
Voice


Joined: 19 Mar 2006
Posts: 8

PostPosted: Mon Mar 27, 2006 12:29 pm    Post subject: Reply with quote

Sir your the best! Works Fine now... thx a lot ^^
Back to top
View user's profile Send private message
CuteBangla
Halfop


Joined: 27 Feb 2006
Posts: 58
Location: Dhaka, Bangladesh

PostPosted: Thu Apr 20, 2006 3:29 pm    Post subject: Reply with quote

i m getting a problem
if some one become idle for 30 min who was voiced, get his +v again after just a singel word or line !!

& how can we use it in some silected channel only?

Sir_Fz wrote:
Try
Code:
set idle 30 ;# minutes

bind time - * bar

proc bar args {
   foreach c [channels] {
      foreach n [chanlist $c] {
         set handle [nick2hand $n $c]
         if {![matchattr $handle gf] && [isvoice $n $c] && [getchanidle $n $c] >= $::idle} {
            pushmode $c -v $n
         }
      }
   }
}

_________________
SuMiT
iRC.CuteBangla.Com
Back to top
View user's profile Send private message Visit poster's website
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  Next
Page 1 of 2

 
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