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.

Fserv Voicing script

Old posts that have not been replied to for several years.
Locked
S
SmokeyOne
Halfop
Posts: 69
Joined: Tue Jan 14, 2003 6:04 am

Fserv Voicing script

Post by SmokeyOne »

okay, this is what my friend is wanting, a fserve voicing script that does time inervals... but I had helped me a little on this, and here is what we came up with so far... I'm thinking that making a *Pool* to help with anything that would have [] in them that would kill the bot. I'm sure useing \[\blah\]\ would fix it.. but there has to be a simplier way to do that. I did a search to try to find some other ways.. didn't really find anything that helped me. cause it looked that a couple have some what of the same code I was using. guess its just simple to do it a easy way.. I know the rules say no info on "XDCC" stuff. but he wants to search the output of that, and voice it as well.. I told him i could be more annoying than he wants to admit. But I'm sure I can help him figure that part out later. Here is what he came up with.

bind time - ?0" fvoice:list
bind notc * "*File Server*Trigger*" voice

proc fvoice:list {min hour day month year} {
putserv "PRIVMSG #blah :Now Checking for new Servers"
putserv "PRIVMSG #blah :!list"
}
proc voice {nick uhost hand chan args} {
{ pushmode #blah +v $nick }
}

just a simple little code.. but he wants to check for cheaters as well. I'm not a big fan of stuff like this, but i told him I would ask around for some help.

Thanks for any ideas you can provide.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

bind time - ?0" fvoice:list
if this is supposed to trigger fvoice:list every 10mins, then what you meant was:

Code: Select all

bind time - "?0 *" fvoice:list
and
proc voice {nick uhost hand chan args} {
{ pushmode #blah +v $nick }
}
should be

Code: Select all

proc voice {nick uhost hand chan arg} { 
 pushmode #blah +v $nick
}
S
SmokeyOne
Halfop
Posts: 69
Joined: Tue Jan 14, 2003 6:04 am

Post by SmokeyOne »

okay thanks for the heads up on the mistakes there. so every 15 mines would be something like

bind time - "00 *"
bind time - "15 *"
bind time - "30 *"
bind time - "40 *"

and if i was going to be every 30mins it would be

bind time - "00 *"
bind time - "30 *"

correct ?


Also the pool option, would making the pool option involve making a few other set procs to handle spaces,nubmers, and signs like []?

maybe something like

set fvoice:pool {
{File Server*Trigger*}
}

proc fvoice:pool {nick uhost hand chan arg} {
foreach fvoice:pool $::fvoice:pool
if [{string match -nocase $fvoice:pool $arg]}

or something like that ? or would I need would i need something else?
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

SmokeyOne wrote:okay thanks for the heads up on the mistakes there. so every 15 mines would be something like

bind time - "00 *"
bind time - "15 *"
bind time - "30 *"
bind time - "40 *"

and if i was going to be every 30mins it would be

bind time - "00 *"
bind time - "30 *"

correct ?
Yes, but difference between 30 and 40 is not 15 minutes :P
SmokeyOne wrote: Also the pool option, would making the pool option involve making a few other set procs to handle spaces,nubmers, and signs like []?

maybe something like

set fvoice:pool {
{File Server*Trigger*}
}

proc fvoice:pool {nick uhost hand chan arg} {
foreach fvoice:pool $::fvoice:pool
if [{string match -nocase $fvoice:pool $arg]}

or something like that ? or would I need would i need something else?
you can bind notc matching "*"
make a list for example:
set fvoice_list {
"trigger*1*"
"trigger*2*"
}
and use this code:

Code: Select all

proc fvoice:pool {nick uhost hand chan arg} {
global fvoice_list
foreach fvoice_pool $fvoice_list {
 if {[string match -nocase $fvoice_pool $arg]} {
  pushmode #chan +v $nick
  }
 }
}
if the notice is for the channel, you can use $chan.
S
SmokeyOne
Halfop
Posts: 69
Joined: Tue Jan 14, 2003 6:04 am

Post by SmokeyOne »

sorry its taken me awhile to post back, i haven't been able to get online much.


So what your suggestion should be able to take out things like [], and numbers and such as the mirc color codes. if they are stripped?

I have noticed when it picks up sutff within [] it will kill the bot, cause it things its a string command. would just make another little proc to handle something like this work best or no ?
S
SmokeyOne
Halfop
Posts: 69
Joined: Tue Jan 14, 2003 6:04 am

Post by SmokeyOne »

okay i've seem to hit a snag, i got the !list to come up in the channel, the bot see's all the respondses, but ummm..... doesn't voice... guess I messed something up here... there's the code

bind time - "00 *" do:list
bind time - "30 *" do:list

bind notc "*" fvoice:pool
set fvoice:pool:list {
"*File Server Online*"
"*FTP Online*"
"*File Servers Online*"
"*file server online*"
"*(*«*G*x*S*erve*»*)*"
"*(TDCC) Trigger*"
"*««*Server*»»*Trigger*"
"*Fserve Active*"
}
bind pub n !check do:list

proc do:list {min hour day month year} {
putserv "PRIVMSG #chan :\002Now CHecking for New Servers\002"
putserv "PRIVMSG #chan :!list"
}
proc fvoice:pool {nick uhost hand chan arg} {
global fvoice:pool:list
foreach fvoice:pool $fvoice:pool:list {
if {[string match -nocase $fvoice:pool $arg]} {
pushmode #chan +v $nick}
}
}
}

i swear it feels like I went back to n00bie level on tcl.. it sucks when you can't remember, medication does that to you i guess... anyways.. I'm thinking of adding a little bit of error checking, but i kinda want to get this working first. thanks to anyone and everyone that can help.
Locked