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.

need more help..

Old posts that have not been replied to for several years.
Locked
g
grinch157
Halfop
Posts: 42
Joined: Tue Nov 11, 2003 4:34 pm

need more help..

Post by grinch157 »

hey ppl,

can anyone tell me how this script could be improved? i need it to notice the user, but for some reason it displays in channel..


Code: Select all

set chanrules {
"line1"
"line2"
"line3"
}
bind pub o rules1 pub:t
proc pub:t {nick uhost hand chan text} {
global chanrules
set rulenick [lindex [split $text " "] 0]
if {$text != "" && [onchan $rulenick $chan]} {
puthelp "NOTICE $rulenick :these are the rules of our channel. Pay attention!"
foreach line $chanrules { puthelp "NOTICE $rulenick :$line" }
return 0
}
foreach line $chanrules {puthelp "PRIVMSG $chan :$line" }

anybody have insight on this?
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

set chanrules { 
"line1" 
"line2" 
"line3" 
} 
bind pub o rules1 pub:t 
proc pub:t {nick uhost hand chan text} { 
global chanrules 
set rulenick [lindex [split $text] 0] 
if {[llength $text] >= "1" && [onchan $rulenick $chan]} { 
puthelp "NOTICE $rulenick :these are the rules of our channel. Pay attention!" 
foreach line $chanrules { puthelp "NOTICE $rulenick :$line" } 
 }
}
this should notice the rules to the nick when you type rules1 <nick>
e
egghead
Master
Posts: 481
Joined: Mon Oct 29, 2001 8:00 pm
Contact:

Post by egghead »

:)
g
grinch157
Halfop
Posts: 42
Joined: Tue Nov 11, 2003 4:34 pm

Post by grinch157 »

okay thanks,

but now if wanted to make it simpler for some one to use, how would i make it for the user to use by just typing the pub trigger omitting the public channel display and go staight into the notice display to user and eliminated the need to type the nick name with the trigger?
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

then use $nick it stands for the nick who types the pub trigger.
Locked