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.

greetd

Old posts that have not been replied to for several years.
Locked
B
Bytez
Op
Posts: 168
Joined: Mon Aug 11, 2003 1:42 pm

greetd

Post by Bytez »

How can I make this script send a notice to a person ONLY when they enter the channel, is there such an option? Also, non users mean the users NOT on the userlist? Thanks.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Code: Select all

bind join - * notice:user

proc notice:user {nick uhost hand chan} {
 if {[validuser $hand]} {
  puthelp "NOTICE $nick :<your line here>"
 }
}
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

Sir_Fz wrote:

Code: Select all

bind join - * notice:user

proc notice:user {nick uhost hand chan} {
 if {[validuser $hand]} {
  puthelp "NOTICE $nick :<your line here>"
 }
}
change:

Code: Select all

if {[validuser $hand]} {
to:

Code: Select all

if {![validuser $hand]} {
(he said NON users :wink: )
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

yeah, didn't realize that :p
B
Bytez
Op
Posts: 168
Joined: Mon Aug 11, 2003 1:42 pm

Post by Bytez »

Thanks for the script, Sir. When my message goes onto the next line, the notice will only show the first line, everything else gets cut off (not shown). What extra code to I have to enter so it will show ALL the lines instead of the first?
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

you must've skipped the ":"

example:
puthelp "PRIVMSG $nick :Welcome to $chan"

not puthelp "PRIVMSG $nick Welcome to $chan"
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

Sir_Fz wrote:you must've skipped the ":"

example:
puthelp "PRIVMSG $nick :Welcome to $chan"

not puthelp "PRIVMSG $nick Welcome to $chan"
Negative.. what he said is that he has text which goes onto the next line, such as:
This is line 1
This is line 2
The problem is, is that eggdrop strips \n's and other characters from the server queues (while a server will accept multi-lines from a client, this would still be incorrect because there wouldn't be a server command issued with the subsequent lines)...

So what he wants is:

Code: Select all

foreach line [split $text \n] {
  puthelp "NOTICE $nick :$line"
}
(Where $text is the variable containing the multi-lined text)
B
Bytez
Op
Posts: 168
Joined: Mon Aug 11, 2003 1:42 pm

Post by Bytez »

Strikelight, how do I find the variable and do I insert the code before the proc notice line? thanks!
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

Bytez wrote:Strikelight, how do I find the variable and do I insert the code before the proc notice line? thanks!
Uh, the variable is the variable you were trying to put to the server initially but complained that it only put the first line to server.
B
Bytez
Op
Posts: 168
Joined: Mon Aug 11, 2003 1:42 pm

Post by Bytez »

I still don't get it, "the variable is the variable" don't know what you are referring to :P i'm slow at this stuff :x
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

Bytez wrote: When my message goes onto the next line, the notice will only show the first line, everything else gets cut off (not shown).
This variable. *sigh*
Locked