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.

Problem with script (voiceme)

Support & discussion of released scripts, and announcements of new releases.
Post Reply
x
xamrex
Voice
Posts: 13
Joined: Sun Sep 28, 2008 11:07 am

Problem with script (voiceme)

Post by xamrex »

I downloaded viceme script

Code: Select all

## 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?
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Re: Problem with script (voiceme)

Post by speechles »

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.

Code: Select all

set vchan "#up.et"
This should work better.
x
xamrex
Voice
Posts: 13
Joined: Sun Sep 28, 2008 11:07 am

Post by xamrex »

Again this same...
Now I tryied
set vchan "#up.et"
Bot answered
I do not see you on #up.et
:((((
Post Reply