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 posting rules one rule at each line

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
B
Besse
Voice
Posts: 8
Joined: Mon Aug 06, 2007 2:34 pm

Script posting rules one rule at each line

Post by Besse »

Hi a friend have tried to make a script for my eggdrop ( v1.6.18, on Linux 2.6.17-10-generic ) that post some rules when triggered with !rules

Code: Select all

set chans "#legestuen"
set schelptrigger "!rules"
bind pub - $schelptrigger pub_help

####################
#              RULES                 #
####################
proc schelp { nick } {
 
   putserv "NOTICE $nick :These are the rules for #legestuen:"
   putserv "NOTICE $nick :------------------------------------"
   putserv "NOTICE $nick :Rules here"
   putserv "NOTICE $nick :Rules here"
   putserv "NOTICE $nick :------------------------------------"

}
but i get this error Tcl error [pub_help]: invalid command name "pub_help"

Can anyone help me pls ?

Regards
Besse

Oooops posted in the wrong forum.. should have been in scripting support sorry :(
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

You've got different names in the binding and when you define the proc...
bind pub - $schelptrigger pub_help

####################
# RULES #
####################
proc schelp { nick } {
NML_375
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

This should do the work for you:

Code: Select all

set chans "#legestuen"
set schelptrigger "!rules"

bind pub - $schelptrigger pub_help

proc pub_help {nick uhost hand chan text} {
 putserv "NOTICE $nick :These are the rules for $::chans:"
 putserv "NOTICE $nick :------------------------------------"
 putserv "NOTICE $nick :Rules here"
 putserv "NOTICE $nick :Rules here"
 putserv "NOTICE $nick :------------------------------------"
}
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
B
Besse
Voice
Posts: 8
Joined: Mon Aug 06, 2007 2:34 pm

Script working

Post by Besse »

The script is working now.. :D
Thank you very much for your help :mrgreen:
E
Elfriede
Halfop
Posts: 67
Joined: Tue Aug 07, 2007 4:21 am

Post by Elfriede »

every second one line ? :)

how to configure output with a timer ?
B
Besse
Voice
Posts: 8
Joined: Mon Aug 06, 2007 2:34 pm

msg chan instead of notice

Post by Besse »

How do i make it msg chan instead of notice ?
E
Elfriede
Halfop
Posts: 67
Joined: Tue Aug 07, 2007 4:21 am

Post by Elfriede »

Code: Select all

putserv "PRIVMSG $Channel :------------------------------------" 
B
Besse
Voice
Posts: 8
Joined: Mon Aug 06, 2007 2:34 pm

Post by Besse »

Thanks Elfriede :)
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

In such cases, it would be better to use puthelp instead of putserv.
B
Besse
Voice
Posts: 8
Joined: Mon Aug 06, 2007 2:34 pm

putserv or puthelp

Post by Besse »

Sorry, but i'm still a newbie with eggdrops..

What is the differense between putserv and puthelp ?
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

puthelp uses the slowest Eggdrop queue, after it comes putserv and then putquick. Read Tcl-commands.doc about each.
E
Elfriede
Halfop
Posts: 67
Joined: Tue Aug 07, 2007 4:21 am

Post by Elfriede »

putserv "NOTICE $nick :These are the rules for $::chans:"
putserv "NOTICE $nick :------------------------------------"
putserv "NOTICE $nick :Rules here"
putserv "NOTICE $nick :Rules here"
putserv "NOTICE $nick :------------------------------------"
}
Can somone plz tell me how i've to change, that each line we'll be posted every 1 second ? :)
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

If I am not mistaken, and you actually have tested this, it already does what you want; one line per second.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Elfriede use puthelp instead of putserv.
Post Reply