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.

Tcl request

Old posts that have not been replied to for several years.
Locked
G
Guest

Post by Guest »

I run a channel and i wish to change the channel to another one, is it possible that someone can help me make a tcl which notices the user to join the new channel when they come in? Such as something like. 'Hello whoever, this channel is closed please join #newchannel' i'd be grateful if someone could help me, please.
I
Ian-Highlander
Op
Posts: 165
Joined: Mon Sep 24, 2001 8:00 pm
Location: Ely, Cambridgeshire

Post by Ian-Highlander »

bind join * * chan_message

proc chan_message {nick host hand chan} {
if {[string tolower $chan] == [string tolower "#youroldchannel"]}
putserv "PRIVMSG $chan :Your message goes here"
return 0
}
return 0
}

That should do it.
:smile:

Really should make sure I'm awake before answering help queries lol
_________________
How can you tell if a blonde is having a bad day?

She has a tampon behind her ear and she forgot where she put her pencil.

http://www.eggdropsrus.co.uk
ian.highlander@eggdropsrus.co.uk

<font size=-1>[ This Message was edited by: Ian-Highlander on 2001-12-08 07:56 ]</font>

<font size=-1>[ This Message was edited by: Ian-Highlander on 2001-12-08 07:56 ]</font>

<font size=-1>[ This Message was edited by: Ian-Highlander on 2001-12-08 07:58 ]</font>
G
Guest

Post by Guest »

Thanks you! :smile: This will notice the person?
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

This will say your "Your message goes here" in the channel when a user is joining. If you want to notice the user then change this:

- from -
putserv "PRIVMSG $chan :Your message goes here"

- to -
putserv "NOTICE $nick :Your message goes here"

This should do it. :smile:
G
Guest

Post by Guest »

I added the Notice $nick thingy, but it still doesn't seem to work, the two things i edited were the channel and the message is there more to be edited i can't get it to work... :sad:
I
Ian-Highlander
Op
Posts: 165
Joined: Mon Sep 24, 2001 8:00 pm
Location: Ely, Cambridgeshire

Post by Ian-Highlander »

This might be stating the obvious, but you did save it as a .tcl file and add a line to the bottom of your bots config file then .rehash the bot didnt you?
Also make sure there is a space after $nick or $chan (whichever line you decided to use in the end) before the colon :

If you still cant get it working and you've done all this paste up exactly what you are typing in and how you are loading it.

Regards

Ian-Highlander
"Insanity Takes Its Toll, Please Have Exact Change"
G
Guest

Post by Guest »

Hehe, i am not that much of a newbie. I know how to operate tcls, just not how to use them... i put the line at the bottom of the conf and rehashed. i used a test channel and put the name of it into the tcl. i have exactly what you told me to put except i changed the message, channel and the NOTICE $NICK. I have no idea why it won't work :sad:
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Have you tried a .restart of the eggy ?
G
Guest

Post by Guest »

i tried rehash, i will try restart now
G
Guest

Post by Guest »

still no good :sad:
i
inv|s|ble

Post by inv|s|ble »

There are several ONJOIN/GREET scripts already made, that you could be using also.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Hey Sean check this out:

- Code -
bind join * * chan_message

proc chan_message {nick host hand chan} {
global botnick
if {$nick == $botnick} {return 1}
if {[validchan #YourOldChan]} {
putserv "PRIVMSG $chan :Your message to channel goes here"
putserv "NOTICE $nick :Your notice to nick goes here"
}
}
- Code -
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Hey Ian-Highlander your "if {[string tolower $chan] == [string tolower "#youroldchannel"]}' has this error:
"TCL error [chan_message]: wrong # args: no script following "{[string tolower $ch" argument".

And Sean in the future pls say in the forum what errors did you get.
I
Ian-Highlander
Op
Posts: 165
Joined: Mon Sep 24, 2001 8:00 pm
Location: Ely, Cambridgeshire

Post by Ian-Highlander »

LMAO, oops, knew I shouldnt try and code anything that early in the day. :razz:

I missed out an opening brace after the "if {[string tolower $chan......" bit, this definitely works, I tested it:

Code: Select all

bind join * * chan_message 

proc chan_message {nick host hand chan} { 
if {[string tolower $chan] == [string tolower "#youroldchanname"]} {
putserv "PRIVMSG $chan :Your message goes here" 
return 0 
} 
return 0 
}
Regards

Ian-Highlander

_________________
How can you tell if a blonde is having a bad day?

She has a tampon behind her ear and she forgot where she put her pencil.

http://www.eggdropsrus.co.uk
ian.highlander@eggdropsrus.co.uk

<font size=-1>[ This Message was edited by: Ian-Highlander on 2001-12-12 19:32 ]</font>
Locked