| View previous topic :: View next topic |
| Author |
Message |
xamrex Voice
Joined: 28 Sep 2008 Posts: 13
|
Posted: Mon Nov 17, 2008 11:31 am Post subject: Problem with script (voiceme) |
|
|
I downloaded viceme script
| Code: | ## VoiceMe script
## Version 1.0 (My first public script) Wish me luck :P
## So the script voices users when they request it to a bot /msg <Botnick> voiceme
## And it devoice users when they type /msg <BotNick> devoiceme
## And after a period of time (that can be set in settings current is 30 minutes)
## it devoices all users that not talked on channel for 30 minutes
## Have fun using my script
## Made by Silviu <Silviu@Deva.Rdsnet.Ro>
## Example
## /msg Bot voiceme #channel
## [00:00:00] * Bot sets mode: +v MyNick
## Then i get a notice from the Bot
## [00:00:00] -Bot- Have fun and so on, If you do not need voice anymore use /msg Bot devoiceme
## /msg Bot devoiceme #channel
## [00:00:00] * Bot sets mode: -v MyNick
## Then i get a notice from the Bot
## [00:00:00] -Bot- If u want later to get +v use /msg Bot voiceme
## Commands
## /msg <Botnick> voiceme
## /msg <Botnick> devoiceme
## Settings
## The channel where you want the script to be active
set vchan #channel
## The time you want to let the users with voice status in minutes
set vtime 30
## The time for the bot to check the channel in minutes
set vchecktime 1
## Now the script :))
## If u change something it will be on your own risk !!!
if {![string match "*idle:devoice*" [timers]]} { timer $vchecktime idle:devoice }
proc idle:devoice {} {
global vchan vtime vchecktime
foreach user [chanlist $vchan] {
if {[getchanidle $user $vchan] > $vtime} {
if { [isvoice $user $vchan] } { pushmode $vchan -v $user }
}
}
timer $vchecktime idle:devoice
}
bind msg - voiceme msg:voiceme
proc msg:voiceme { nick host hand text } {
global vchan
global botnick
if {![onchan $nick $vchan]} {
puthelp "NOTICE $nick :I do not see you on $vchan"
return 0
}
if {![string match -nocase "*.undernet.org" $host]} {
puthelp "NOTICE $nick :You do not have +x mode. Only *.users.undernet.org can get +v on $vchan"
return 0
}
if {[isvoice $nick $vchan]} {
puthelp "NOTICE $nick :You already have +v on $vchan. If you do not need use /msg $botnick devoiceme"
return 1
}
pushmode $vchan +v $nick
puthelp "NOTICE $nick :Have fun and so on, If you do not need voice anymore use /msg $botnick devoiceme"
return 1
}
bind msg - devoiceme msg:devoiceme
proc msg:devoiceme { nick host hand text } {
global vchan
global botnick
if {![onchan $nick $vchan]} {
puthelp "NOTICE $nick :I can not see you on $vchan"
return 0
}
if {![isvoice $nick $vchan]} {
puthelp "NOTICE $nick :You do not have +v on $vchan. If u want to get voice type /msg $botnick voiceme"
return 0
}
pushmode $vchan -v $nick
puthelp "NOTICE $nick :If u want later to get +v use /msg $botnick voiceme"
}
putlog "VoiceMe script v. 1.0 by Silviu loaded succesfully for any bugs , comments mail <Silviu@Deva.Rdsnet.Ro>"
|
And I changed set vchan #channel
to set vchan #up.et (my chan)
And when Someone is on my chan, and write to bot voiceme
Bot is answering: I do not see you on
BUT I AM ON THIS CHANNEL!!
Can someone test this script? |
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Mon Nov 17, 2008 6:33 pm Post subject: Re: Problem with script (voiceme) |
|
|
| xamrex wrote: | I downloaded viceme script
And I changed set vchan #channel
to set vchan #up.et (my chan)
And when Someone is on my chan, and write to bot voiceme
Bot is answering: I do not see you on
BUT I AM ON THIS CHANNEL!!
Can someone test this script? |
Most likely the problem is the lack of double quotation marks around the channel name. The dot (period) in the channel name is misread without them.
This should work better. _________________ speechles' eggdrop tcl archive |
|
| Back to top |
|
 |
xamrex Voice
Joined: 28 Sep 2008 Posts: 13
|
Posted: Tue Nov 18, 2008 3:10 am Post subject: |
|
|
Again this same...
Now I tryied
set vchan "#up.et"
Bot answered
I do not see you on #up.et
((( |
|
| Back to top |
|
 |
|