| View previous topic :: View next topic |
| Author |
Message |
terryd Voice
Joined: 27 Dec 2005 Posts: 5
|
Posted: Tue Dec 27, 2005 6:19 pm Post subject: stuck with On join |
|
|
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 |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Tue Dec 27, 2005 6:32 pm Post subject: |
|
|
| 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 |
|
 |
terryd Voice
Joined: 27 Dec 2005 Posts: 5
|
Posted: Tue Dec 27, 2005 7:30 pm Post subject: Stuck with on join |
|
|
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 |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Tue Dec 27, 2005 7:44 pm Post subject: |
|
|
| 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.  _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
terryd Voice
Joined: 27 Dec 2005 Posts: 5
|
Posted: Tue Dec 27, 2005 8:14 pm Post subject: Stuck on join |
|
|
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
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 |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Tue Dec 27, 2005 9:13 pm Post subject: |
|
|
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!  _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
terryd Voice
Joined: 27 Dec 2005 Posts: 5
|
Posted: Tue Dec 27, 2005 9:31 pm Post subject: On join problems |
|
|
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
 |
|
| Back to top |
|
 |
|