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 

stuck with On join

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


Joined: 27 Dec 2005
Posts: 5

PostPosted: Tue Dec 27, 2005 6:19 pm    Post subject: stuck with On join Reply with quote

I have

bind join - * proc_join
proc proc_join {nick chan text} {
putserv "PRIVMSG $chan :$nick:For info on server do !help"
}

I have tried a few variations and im still reading the docs now.
But when i join the channle with the bot no joy
all my other things work fine like 1help for example

Terry
Back to top
View user's profile Send private message
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3741
Location: Mint Factory

PostPosted: Tue Dec 27, 2005 6:32 pm    Post subject: Reply with quote

tcl-commands.doc wrote:

procname <nick> <user@host> <handle> <channel>

next time check the doc/tcl-commands.doc file before posting.
_________________
Once the game is over, the king and the pawn go back in the same box.
Back to top
View user's profile Send private message
terryd
Voice


Joined: 27 Dec 2005
Posts: 5

PostPosted: Tue Dec 27, 2005 7:30 pm    Post subject: Stuck with on join Reply with quote

I now have

bind join - * test

proc test {nick uhost handle chan } {
putserv "PRIVMSG $chan : $nick :Hello there!"
}

I have also tried a few other ways. The doc you pointed out i have read a dozen time today. But thank you any way
Back to top
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Tue Dec 27, 2005 7:44 pm    Post subject: Reply with quote

Code:
#Set here the channels that you don't want onjoin msg enabled. Set "*" for all.
set no-msg(chan) "#chan1 #chan2"

bind join - * onjoin:msg

proc onjoin:msg {nick uhost hand chan} {
    global no-msg
    set chan [string tolower $chan]
    if {(([lsearch -exact [string tolower $no-msg(chan)] $chan] >= 0) || ($no-msg(chan) == "*"))} {return}
    puthelp "NOTICE $nick :For info on server do !help"
}

The above untested; easily altered to suite your own particular needs. Smile
_________________
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Back to top
View user's profile Send private message Visit poster's website
terryd
Voice


Joined: 27 Dec 2005
Posts: 5

PostPosted: Tue Dec 27, 2005 8:14 pm    Post subject: Stuck on join Reply with quote

Well i tried your snippet in its complete form and tried to tweak it but to no avail.
Today is me first day at this so i must be doing some thing really silly some where Smile
My other snippets i have been fiddling with just basic stuff to get the feel of things like

bind pub - !os pub:os

proc pub:os {nick host handle chan text} {
set uname [exec uname -a]
putserv "PRIVMSG $chan :$uname"
}

for example all work fine its just this join thing. But never mind thanks for your help i will keep reading and tweaking

Cheers
Back to top
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Tue Dec 27, 2005 9:13 pm    Post subject: Reply with quote

Just use this instead:
Code:
bind join - * onjoin:msg

proc onjoin:msg {nick uhost hand chan} {
    puthelp "NOTICE $nick :For info on server do !help"
}

.. tested and works! Very Happy
_________________
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Back to top
View user's profile Send private message Visit poster's website
terryd
Voice


Joined: 27 Dec 2005
Posts: 5

PostPosted: Tue Dec 27, 2005 9:31 pm    Post subject: On join problems Reply with quote

Cheers for that all is now well. To get it going i had to put it in a seperate file for some reason.
I have like half a dozen other script sections in my main script file i thought that was ok to do and they all work fine.

Cheers for your time and help Alchera
Smile
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 -> 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