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.
Old posts that have not been replied to for several years.
grinch157
Halfop
Posts: 42 Joined: Tue Nov 11, 2003 4:34 pm
Post
by grinch157 » Wed Nov 19, 2003 9:17 pm
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?
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Thu Nov 20, 2003 9:52 am
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>
egghead
Master
Posts: 481 Joined: Mon Oct 29, 2001 8:00 pm
Contact:
Post
by egghead » Thu Nov 20, 2003 7:56 pm
grinch157
Halfop
Posts: 42 Joined: Tue Nov 11, 2003 4:34 pm
Post
by grinch157 » Thu Nov 20, 2003 8:28 pm
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?
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Fri Nov 21, 2003 9:53 am
then use $nick it stands for the nick who types the pub trigger.