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.
Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
silx
Voice
Posts: 13 Joined: Sat Feb 04, 2006 1:12 am
Post
by silx » Sat Feb 04, 2006 1:14 am
need something that will auto voice people after a set number of lines that person has typed in a public channel.
or if that cannot be done.
voice after xx minutes on a channel
plz help
metroid
Owner
Posts: 771 Joined: Wed Jun 16, 2004 2:46 am
Post
by metroid » Sat Feb 04, 2006 2:53 am
Code: Select all
set lines 10
array set users {}
bind pubm - * voice:lines
proc voice:lines {nick host hand chan arguments} {
global users lines
if {![info exists users($host)] && ![isvoice $nick $chan] && ![isop $nick $chan]} {
set users($host) 1
} elseif {[expr $users($host) + 1] >= $lines} {
pushmode $chan +v $nick; unset users($host)
} else {
incr users($host)
}
}
This should work like you wanted it too
silx
Voice
Posts: 13 Joined: Sat Feb 04, 2006 1:12 am
Post
by silx » Sat Feb 04, 2006 4:58 am
Tcl error [voice:lines]: can't read "users(-----@-------.net)": no such element in array
---- was replaced
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Sat Feb 04, 2006 10:37 am
Try this:
Code: Select all
set lines 10
array set users {}
bind pubm - * voice:lines
proc voice:lines {nick host hand chan arguments} {
global users lines
if {![info exists users($host)] && ![isvoice $nick $chan] && ![isop $nick $chan]} {
set users($host) 1
} elseif {[info exists users($host)] && [expr $users($host) + 1] >= $lines} {
pushmode $chan +v $nick; unset users($host)
} elseif {[info exists users($host)]} {
incr users($host)
}
}
silx
Voice
Posts: 13 Joined: Sat Feb 04, 2006 1:12 am
Post
by silx » Sat Feb 04, 2006 1:56 pm
that worked
thanks alot
anyway to add a public channel command to for users to type to get voice? like. !bot-voiceme
eggi
Voice
Posts: 11 Joined: Thu Sep 15, 2005 4:45 pm
Post
by eggi » Sat Feb 04, 2006 3:04 pm
if the bot s oper bot & not in a op mode then what line i have to replace ??
pakistani1
Voice
Posts: 26 Joined: Wed Apr 20, 2005 11:35 pm
Location: Pakistan Zindabad
Contact:
Post
by pakistani1 » Wed Jul 19, 2006 4:23 pm
what if we want the bot to devoice the nick after some idle time .. lets say 2 minutes .. idle after being voiced after writing 10 lines ..
and after the devoice the line count should again go to 0..
thanx
!~!~!~!~!~ ::Long Live The REpubLic ::~!~!~!
caesar
Mint Rubber
Posts: 3778 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Fri Jul 21, 2006 1:12 pm
I for one would go for a md5 hash with the nick!ident@host, and splt, part, quit, etc. binds to remove them from the list.
Once the game is over, the king and the pawn go back in the same box.
Aditya
Voice
Posts: 8 Joined: Mon May 08, 2006 3:19 am
Location: New York
Contact:
Post
by Aditya » Tue Jul 25, 2006 4:38 am
With a Script like "Voice On Lines" a Person Culd gain voice with just typing
1
2
3
4
5
6
7
8
9
10
Its better to always have something like 'voice on characters'
I made one for myself long before.. try it
Code: Select all
set voice(len) 120
bind pubm - * voice:lines
proc voice:lines {nick host hand chan arguments} {
global voice
if {[string length $arguments] > $voice(len)} {
if {![isvoice $nick $chan] || ![isop $nick $chan]} {
pushmode $chan +v $nick
}
}
}
Note: can be set according to the channel's needs..[/b]
Aditya
Voice
Posts: 8 Joined: Mon May 08, 2006 3:19 am
Location: New York
Contact:
Post
by Aditya » Tue Jul 25, 2006 4:45 am
pakistani1 wrote: what if we want the bot to devoice the nick after some idle time .. lets say 2 minutes .. idle after being voiced after writing 10 lines ..
and after the devoice the line count should again go to 0..
thanx
Try This:
http://www.egghelp.org/cgi-bin/tcl_arch ... oad&id=354
mvp1
Voice
Posts: 22 Joined: Thu Jan 27, 2022 4:28 am
Post
by mvp1 » Sun May 08, 2022 7:55 pm
Sir_Fz wrote: Try this:
Code: Select all
set lines 10
array set users {}
bind pubm - * voice:lines
proc voice:lines {nick host hand chan arguments} {
global users lines
if {![info exists users($host)] && ![isvoice $nick $chan] && ![isop $nick $chan]} {
set users($host) 1
} elseif {[info exists users($host)] && [expr $users($host) + 1] >= $lines} {
pushmode $chan +v $nick; unset users($host)
} elseif {[info exists users($host)]} {
incr users($host)
}
}
Hi guys, thanks for this. I am using below code and it's working fine. Is there a way I could add a specific nick in this code which is an exception and not to be voiced after 5 lines? For example "specificnick1" ?
set lines 5
array set users {}
bind pubm - * voice:lines
proc voice:lines {nick host hand chan arguments} {
global users lines
if {![info exists users($host)] && ![isvoice $nick $chan] && ![isop $nick $chan]} {
set users($host) 1
} elseif {[info exists users($host)] && [expr $users($host) + 1] >= $lines} {
pushmode $chan +v $nick; unset users($host)
} elseif {[info exists users($host)]} {
incr users($host)
}
}
SpiKe^^
Owner
Posts: 831 Joined: Fri May 12, 2006 10:20 pm
Location: Tennessee, USA
Contact:
Post
by SpiKe^^ » Sun May 08, 2022 11:19 pm
See if this helps any...
Code: Select all
set lines 10
# Exempt hostmask(s) to not voice
# example: set exemptmasks {myNick!*@* *!*@*.sumhost.com}
# Note: set empty to disable any masks checking
set exemptmasks {specificnick1!*@*}
array set users {}
bind pubm - * voice:lines
proc voice:lines {nick host hand chan arguments} {
global users lines exemptmasks
foreach xmask [split [string trim $exemptmasks]] { ;# check if Exempt Hostmask #
if {[matchaddr $xmask ${nick}!$host]} { return 0 }
}
if {![info exists users($host)] && ![isvoice $nick $chan] && ![isop $nick $chan]} {
set users($host) 1
} elseif {[info exists users($host)] && [expr $users($host) + 1] >= $lines} {
pushmode $chan +v $nick; unset users($host)
} elseif {[info exists users($host)]} {
incr users($host)
}
}
mvp1
Voice
Posts: 22 Joined: Thu Jan 27, 2022 4:28 am
Post
by mvp1 » Mon May 09, 2022 12:19 am
Cheers Spike mate, will test this and let you know. Quick question; Any chance this would work for more than one exceptions nick? e.g specificnick1 , specificnick2 and so on.. if I only change below as?
set exemptmasks {specificnick1!*@* specificnick2!*@* specificnick3!*@*}
Spartan
Voice
Posts: 6 Joined: Fri Apr 29, 2022 10:19 pm
Post
by Spartan » Wed May 11, 2022 4:52 am
Is better the bot to give voice to the user who have 15 min and up who talk in channel not from 5 line, and if user doesnt talk 30 min in channel to devoice
also to check if the users is blacklist to not get voice.
Online
simo
Revered One
Posts: 1107 Joined: Sun Mar 22, 2015 2:41 pm
Post
by simo » Mon May 23, 2022 9:49 am
it would probably be a good idea as Spartan suggested to add a check how long the nick has been in channel for example 5 or 10 min to make sure abusers and flooders dont get voiced altho abusers and flooders can be in channel after 5 or 10 min but usually they join and want to abuse/flood right away and therefor get removed so the script shouldnt consider them as they are prob removed before threshold is reached
this is a usefull code in the case of massive abuse or floods and the channel is set to +m or +M so the regular active chatters can resume chatting