egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problem with script (voiceme)

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
xamrex
Voice


Joined: 28 Sep 2008
Posts: 13

PostPosted: Mon Nov 17, 2008 11:31 am    Post subject: Problem with script (voiceme) Reply with quote

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
View user's profile Send private message
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Mon Nov 17, 2008 6:33 pm    Post subject: Re: Problem with script (voiceme) Reply with quote

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:
set vchan "#up.et"

This should work better.
_________________
speechles' eggdrop tcl archive
Back to top
View user's profile Send private message
xamrex
Voice


Joined: 28 Sep 2008
Posts: 13

PostPosted: Tue Nov 18, 2008 3:10 am    Post subject: Reply with quote

Again this same...
Now I tryied
set vchan "#up.et"
Bot answered
I do not see you on #up.et
Sad(((
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber