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.

script to send msg to user as soon as they join channel

Old posts that have not been replied to for several years.
Locked
M
MnM
Voice
Posts: 17
Joined: Sat Jan 01, 2005 1:43 pm

script to send msg to user as soon as they join channel

Post by MnM »

Hi all,

I require a script that can send a msg to the user that just joined a particular channel.
I need around 12 lines to issue some instructions, each on a new line.
Can anybody help me with this please?

Thanks guys.
User avatar
^DooM^
Owner
Posts: 772
Joined: Tue Aug 26, 2003 5:40 pm
Location: IronForge
Contact:

Post by ^DooM^ »

The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

It will be something like this:

Code: Select all

#Set the channel to message the user on
set msg_chan "#mychannel"

bind join - "*" msg:user

proc msg:user {nick uhost hand chan} {
 global msg_chan
 if {![isbotnick $nick] && [string equal -nocase $msg_chan $chan]} {
  puthelp "PRIVMSG $nick :......line 1......."
  puthelp "PRIVMSG $nick :......line 2......."
  puthelp "PRIVMSG $nick :......line 3......."
  puthelp "PRIVMSG $nick :......line 4......."
  puthelp "PRIVMSG $nick :......line 5......."
  puthelp "PRIVMSG $nick :......line 6......."
  puthelp "PRIVMSG $nick :......line 7......."
  puthelp "PRIVMSG $nick :......line 8......."
  puthelp "PRIVMSG $nick :......line 9......."
  puthelp "PRIVMSG $nick :......line 10......."
  puthelp "PRIVMSG $nick :......line 11......."
  puthelp "PRIVMSG $nick :......line 12......."
}
Generally sending 12 lines of message to a user joining a channel wouldn't be my idea of a script which wouldn't be a good script. You should make your messages small, short and precise to the point.

If your channel is big, then your bot will have alot of queues and might lag, but still I used puthelp here, where 1 msg would be sent after a delay of 1 sec.
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

better idea might be to send an URL and write the complete 12 line text there :).
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

or just dcc a txt with the data in it with a trigger .. to get it of course .., or spread out your data with timers.. if it's ofcourse not one .. text other wize there is no use..
XplaiN but think of me as stupid
User avatar
mcdarby
Halfop
Posts: 69
Joined: Tue Jul 16, 2002 7:46 pm
Location: Bangor, Pennsylvania
Contact:

Post by mcdarby »

awyeah wrote:It will be something like this:

Code: Select all

#Set the channel to message the user on
set msg_chan "#mychannel"

bind join - "*" msg:user

proc msg:user {nick uhost hand chan} {
 global msg_chan
 if {![isbotnick $nick] && [string equal -nocase $msg_chan $chan]} {
  puthelp "PRIVMSG $nick :......line 1......."
  puthelp "PRIVMSG $nick :......line 2......."
  puthelp "PRIVMSG $nick :......line 3......."
  puthelp "PRIVMSG $nick :......line 4......."
  puthelp "PRIVMSG $nick :......line 5......."
  puthelp "PRIVMSG $nick :......line 6......."
  puthelp "PRIVMSG $nick :......line 7......."
  puthelp "PRIVMSG $nick :......line 8......."
  puthelp "PRIVMSG $nick :......line 9......."
  puthelp "PRIVMSG $nick :......line 10......."
  puthelp "PRIVMSG $nick :......line 11......."
  puthelp "PRIVMSG $nick :......line 12......."
}
Generally sending 12 lines of message to a user joining a channel wouldn't be my idea of a script which wouldn't be a good script. You should make your messages small, short and precise to the point.

If your channel is big, then your bot will have alot of queues and might lag, but still I used puthelp here, where 1 msg would be sent after a delay of 1 sec.
Um, that was giving a number of errors starting with:

Tcl error in file 'eggdrop.conf':
missing close-brace
while executing
"proc notice:user {nick uhost hand chan}"

Attempting to add the close-brace leads to this.

Tcl error in file 'eggdrop.conf':
can't read "chan": no such variable
while executing
"string equal -nocase $notice_chan $chan"

Might want to check to make sure that scripts right.
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Change:

Code: Select all

  puthelp "PRIVMSG $nick :......line 12......." 
}
to:

Code: Select all

  puthelp "PRIVMSG $nick :......line 12......." 
 }
}
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
M
MnM
Voice
Posts: 17
Joined: Sat Jan 01, 2005 1:43 pm

Post by MnM »

Thanks guys.
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Forgot the proc close bracket in a hurry heh.

Always remember the number of "{" opening curly brackets in a procedure should be always equal to the number of "}" closing curly brackets; if there not the same you will get a tcl error and if your bot is online it will crash and disconnect untill you fix this.
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
User avatar
^DooM^
Owner
Posts: 772
Joined: Tue Aug 26, 2003 5:40 pm
Location: IronForge
Contact:

Post by ^DooM^ »

Edit Plus has a nice little function to show matching curley braces. Just highlight the brace and press CTRL + } and it highlites its matching brace. if there is no matching brace it doesnt highlite anything and you know theres a problem. Helped me out no end of times :D
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

and if you use the eggdrop thingy syntax highlighter, and completion then you don't even need to worry about that cause when typing if or something like that editplus adds them auto
XplaiN but think of me as stupid
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Post by greenbear »

so notepad users are hardcore nowadays, eh :D
User avatar
^DooM^
Owner
Posts: 772
Joined: Tue Aug 26, 2003 5:40 pm
Location: IronForge
Contact:

Post by ^DooM^ »

gb wrote:so notepad users are hardcore nowadays, eh :D
hardcore indeed. I couldn't be without my nice coloured text and auto complete / indenting these days..

So i am lazy :lol:
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
Locked