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.

A voice script needed

Old posts that have not been replied to for several years.
K
Kaarel
Halfop
Posts: 91
Joined: Sat Apr 26, 2003 5:24 am

A voice script needed

Post by Kaarel »

Ok, I would like such a voice script that doesnt`t give voice to user when he gets a auto voice in channel. I would like voice script that voices in period a time all peole that doesn`t have voice. And ops will not be voiced
Is that possible
User avatar
ReaLz
Op
Posts: 121
Joined: Sat Oct 19, 2002 5:33 am
Location: Athens, Greece

Post by ReaLz »

I have made this code for you but I haven't tested it.

Code: Select all

bind time - "?0 * * * *" time_proc

set channel "#chan"

proc time_proc {min hour day month year} {voice_all}

proc voice_all {} {
if {![botisop $channel]} { 
putlog "I'm not oped in $channel."
} 
foreach user [chanlist $channel] { 
if {![isvoice $user $channel] && ![isop $user $channel]} { 
pushmode $channel +v $user 
} 
} 
putlog "I just voiced all the users in $channel." 
}
with this script the bot will voice all the users that are not voiced or opped every 10 minutes. to change the delay read the tcl-commands.doc and look at the bind time.
«A fantastic spaghetti is a spaghetti that does not exist»
K
Kaarel
Halfop
Posts: 91
Joined: Sat Apr 26, 2003 5:24 am

Post by Kaarel »

ReaLz thanks, but I thought is that possible to ignore some users, that is not voiced and bot will not gives their voice
User avatar
ReaLz
Op
Posts: 121
Joined: Sat Oct 19, 2002 5:33 am
Location: Athens, Greece

Post by ReaLz »

you can do that...
replace this:

Code: Select all

if {![isvoice $user $channel] && ![isop $user $channel]} {
with this:

Code: Select all

if {![isvoice $user $channel] && ![isop $user $channel] && ![matchattr $user B]} {
you have to add the users you want them devoiced to the bot with the flag B and only that flag.
uppercase B (blacklisted) is a custom flag that the bot will use to except some users. ofcourse you can use any other capital letter you want.
«A fantastic spaghetti is a spaghetti that does not exist»
User avatar
ReaLz
Op
Posts: 121
Joined: Sat Oct 19, 2002 5:33 am
Location: Athens, Greece

Post by ReaLz »

also put this:

Code: Select all

set hand [nick2hand $user]
after the:

Code: Select all

foreach user [chanlist $channel] {
and replace this:

Code: Select all

![matchattr $user B]
with this:

Code: Select all

![matchattr $hand B]
«A fantastic spaghetti is a spaghetti that does not exist»
K
Kaarel
Halfop
Posts: 91
Joined: Sat Apr 26, 2003 5:24 am

Post by Kaarel »

My bot says
<Botman> [18:50] Tcl error [time_proc]: can't read "channel": no such variable



And that code if {![isvoice $user $channel] && ![isop $user $channel] && ![matchattr $user B]} {


Where do I have to put names
User avatar
ReaLz
Op
Posts: 121
Joined: Sat Oct 19, 2002 5:33 am
Location: Athens, Greece

Post by ReaLz »

here is the complete code:

Code: Select all

set channel "#chan"

bind time - "?0 * * * *" time_proc 

proc time_proc {min hour day month year} {voice_all} 

proc voice_all {} { 
if {![botisop $::channel]} { 
putlog "I'm not oped in $::channel." 
} 
foreach user [chanlist $::channel] {
set hand [nick2hand $user]
if {![isvoice $user $::channel] && ![isop $user $::channel] && ![matchattr $hand B]} { 
pushmode $::channel +v $user 
} 
} 
putlog "I just voiced all the users in $::channel." 
}

putlog "Auto voice tcl loaded.."
«A fantastic spaghetti is a spaghetti that does not exist»
K
Kaarel
Halfop
Posts: 91
Joined: Sat Apr 26, 2003 5:24 am

Post by Kaarel »

Ok it worked, but please make to me a script like the bot doesn`t voice Peter Karl and Joshep
S
Storm
Voice
Posts: 36
Joined: Fri Apr 25, 2003 12:59 am
Location: Vancouver, Canada

Post by Storm »

Give them B flag.
.chattr <user> +B
User avatar
ReaLz
Op
Posts: 121
Joined: Sat Oct 19, 2002 5:33 am
Location: Athens, Greece

Post by ReaLz »

Do these and the user you want won't be voiced anymore:

Code: Select all

.adduser nick
.chattr nick +B
«A fantastic spaghetti is a spaghetti that does not exist»
K
Kaarel
Halfop
Posts: 91
Joined: Sat Apr 26, 2003 5:24 am

Post by Kaarel »

Ok, is this impossible to addusers all the users starting [PT]


Like [PT]stats
[PT]log

It would be then much easier
User avatar
ReaLz
Op
Posts: 121
Joined: Sat Oct 19, 2002 5:33 am
Location: Athens, Greece

Post by ReaLz »

you want to add them and chattr them +B or NOT add them?
«A fantastic spaghetti is a spaghetti that does not exist»
K
Kaarel
Halfop
Posts: 91
Joined: Sat Apr 26, 2003 5:24 am

Post by Kaarel »

ReaLz wrote:you want to add them and chattr them +B or NOT add them?

I want to add them aand chattr them +b (all users starting [PT] )
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Try creating a user called ptusers, then adding the hostmask [pt]*!*@*

Then give ptusers +B and you're done.
K
Kaarel
Halfop
Posts: 91
Joined: Sat Apr 26, 2003 5:24 am

Post by Kaarel »

stdragon wrote:Try creating a user called ptusers, then adding the hostmask [pt]*!*@*

Then give ptusers +B and you're done.
Sorry but I cant underestand
Can you give me a code what I have to write into bot in DCC chat
Locked