egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Script posting rules one rule at each line

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
Besse
Voice


Joined: 06 Aug 2007
Posts: 8

PostPosted: Mon Aug 06, 2007 2:54 pm    Post subject: Script posting rules one rule at each line Reply with quote

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:
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 Sad
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Mon Aug 06, 2007 3:36 pm    Post subject: Reply with quote

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

####################
# RULES #
####################
proc schelp { nick } {

_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
awyeah
Revered One


Joined: 26 Apr 2004
Posts: 1580
Location: Switzerland

PostPosted: Mon Aug 06, 2007 8:34 pm    Post subject: Reply with quote

This should do the work for you:

Code:

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.
==================================
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
Besse
Voice


Joined: 06 Aug 2007
Posts: 8

PostPosted: Tue Aug 07, 2007 9:28 am    Post subject: Script working Reply with quote

The script is working now.. Very Happy
Thank you very much for your help Mr. Green
Back to top
View user's profile Send private message
Elfriede
Halfop


Joined: 07 Aug 2007
Posts: 67

PostPosted: Tue Aug 07, 2007 9:43 am    Post subject: Reply with quote

every second one line ? Smile

how to configure output with a timer ?
Back to top
View user's profile Send private message
Besse
Voice


Joined: 06 Aug 2007
Posts: 8

PostPosted: Tue Aug 07, 2007 9:56 am    Post subject: msg chan instead of notice Reply with quote

How do i make it msg chan instead of notice ?
Back to top
View user's profile Send private message
Elfriede
Halfop


Joined: 07 Aug 2007
Posts: 67

PostPosted: Tue Aug 07, 2007 10:13 am    Post subject: Reply with quote

Code:

putserv "PRIVMSG $Channel :------------------------------------"
Back to top
View user's profile Send private message
Besse
Voice


Joined: 06 Aug 2007
Posts: 8

PostPosted: Tue Aug 07, 2007 10:19 am    Post subject: Reply with quote

Thanks Elfriede Smile
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Tue Aug 07, 2007 11:49 am    Post subject: Reply with quote

In such cases, it would be better to use puthelp instead of putserv.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
Besse
Voice


Joined: 06 Aug 2007
Posts: 8

PostPosted: Tue Aug 07, 2007 1:40 pm    Post subject: putserv or puthelp Reply with quote

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

What is the differense between putserv and puthelp ?
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Tue Aug 07, 2007 2:40 pm    Post subject: Reply with quote

puthelp uses the slowest Eggdrop queue, after it comes putserv and then putquick. Read Tcl-commands.doc about each.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
Elfriede
Halfop


Joined: 07 Aug 2007
Posts: 67

PostPosted: Thu Aug 09, 2007 5:35 pm    Post subject: Reply with quote

Quote:

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 ? Smile
Back to top
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Thu Aug 09, 2007 7:04 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Fri Aug 10, 2007 2:59 am    Post subject: Reply with quote

Elfriede use puthelp instead of putserv.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber