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 

setudef problem

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
darton
Op


Joined: 21 Jan 2006
Posts: 155

PostPosted: Thu Feb 23, 2006 11:22 am    Post subject: setudef problem Reply with quote

Hello!
This is my script:
Code:
setudef flag help
bind pub - !help help
proc help {nick host hand chan rest} {
   puthelp "privmsg $chan :blablabla"
}

The bot is listened on more than one channel. And I want that it only answers on one of these channels. So I insert "setudef flag help" in my script. But now the bot still anwers in every channel. What do I have to add to my script that it works.
Back to top
View user's profile Send private message
deadite66
Halfop


Joined: 30 May 2005
Posts: 74
Location: Great Yarmouth, UK

PostPosted: Thu Feb 23, 2006 1:01 pm    Post subject: Reply with quote

try

Code:
bind pub - !help help
proc help {nick host hand chan rest} {
if {$chan =="#mychannel"} {
  puthelp "privmsg $chan :blablabla"
   }
}

_________________
<- tcl newb
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Thu Feb 23, 2006 1:34 pm    Post subject: Re: setudef problem Reply with quote

darton wrote:
Hello!
This is my script:
Code:
setudef flag help
bind pub - !help help
proc help {nick host hand chan rest} {
   puthelp "privmsg $chan :blablabla"
}

The bot is listened on more than one channel. And I want that it only answers on one of these channels. So I insert "setudef flag help" in my script. But now the bot still anwers in every channel. What do I have to add to my script that it works.

You need to check if the channel is set to +help.
Code:
if {[channel get $chan help]} {
 puthelp "privmsg $chan :blablabla"
}

_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
miCHa
Voice


Joined: 07 Mar 2006
Posts: 1
Location: Gelsenkirchen (Germany)

PostPosted: Tue Mar 07, 2006 3:28 pm    Post subject: Reply with quote

sorry for pushing this thread. This is only a tip, if you dont want to use setudef (checkin if its on etc.)

Code:
bind pub - !help help

proc help { nickname hostname handle channel arguments } {
if {[string equal -nocase $channel "#your_channel"]} {
  putserv "privmsg $channel :your text!"
  }
}

_________________
#micha (on QuakeNet) - www.micha.es
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help 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