| View previous topic :: View next topic |
| Author |
Message |
Balkanac Voice
Joined: 15 Aug 2005 Posts: 12
|
Posted: Sun Sep 11, 2005 11:18 am Post subject: Faq-Script help |
|
|
Hello,
I've got a problem with this little script.
| Quote: | | [17:11] Tcl error [faq]: wrong # args: should be "faq n u h c t" |
Can anyone help me please?
| Code: | bind msg - !faq faq
proc faq {n u h c t} {
putserv "PRIVMSG $t FAQ - Frequently Asked Questions - Häufig gestellte Fragen"
putserv "PRIVMSG $t -"
putserv "PRIVMSG $t Die offizielle FAQ Site von Vip-Net findet ihr unter: http://www.vip-net.ch/services/chat/faq_d.php"
putserv "PRIVMSG $t -"
putserv "PRIVMSG $t 1 Wie werde ich OP?"
putserv "PRIVMSG $t 2 Wie registriere ich meinen Nick?"
putserv "PRIVMSG $t 3 Wie registriere ich einen Channel?"
putserv "PRIVMSG $t 4 Wie lauten die Chatregeln?"
putserv "PRIVMSG $t 5 Was ist flood?"
putserv "PRIVMSG $t 6 Was ist ein Bot?"
putserv "PRIVMSG $t 7 Wie mache ich meinen eigenen Raum auf?"
putserv "PRIVMSG $t 8 Wie wechsel ich meinen Nick?"
putserv "PRIVMSG $t 9 Warum kann ich meinen Nick nicht wechseln?"
putserv "PRIVMSG $t 10 Warum kann ich in einem bestimmten Raum nicht mehr chaten?"
putserv "PRIVMSG $t 11 Was bedeuted das Schloss vor meinem Nick?"
putserv "PRIVMSG $t 12 Wieso kann ich bestimmte Channels nicht mehr betreten (need correct key)?"
putserv "PRIVMSG $t -"
putserv "PRIVMSG $t Bitte gib die gewünschte Nummer (hier im P-Fenster) mit !faq<nummer> an. (z.B. !faq3)"
} |
|
|
| Back to top |
|
 |
greenbear Owner
Joined: 24 Sep 2001 Posts: 733 Location: Norway
|
Posted: Sun Sep 11, 2005 11:29 am Post subject: |
|
|
msg binds only have 4 args, not 5, in the form of: 'nick userhost handle text'.
| Code: | bind msg - !faq faq
proc faq {n u h t} {
putserv "PRIVMSG $n :<message goes here>"
} |
|
|
| Back to top |
|
 |
Balkanac Voice
Joined: 15 Aug 2005 Posts: 12
|
Posted: Sun Sep 11, 2005 12:43 pm Post subject: |
|
|
And public?
public cmd: !faq
and then at the private query put the answers.
Sorry for my bad English :d |
|
| Back to top |
|
 |
greenbear Owner
Joined: 24 Sep 2001 Posts: 733 Location: Norway
|
Posted: Sun Sep 11, 2005 12:47 pm Post subject: |
|
|
| Code: | bind pub - !faq faq
proc faq {n u h c t} {
putserv "PRIVMSG $n :<message goes here>"
} |
|
|
| Back to top |
|
 |
Balkanac Voice
Joined: 15 Aug 2005 Posts: 12
|
Posted: Sun Sep 11, 2005 12:51 pm Post subject: |
|
|
Error: | Quote: | | [18:48] Tcl error [faq]: wrong # args: should be "faq n u h t" |
| Code: | bind pub - !faq faq
proc faq {n u h c t} {
putserv "PRIVMSG $n FAQ - Frequently Asked Questions - Häufig gestellte Fragen"
putserv "PRIVMSG $n -"
putserv "PRIVMSG $n Die offizielle FAQ Site von Vip-Net findet ihr unter: http://www.vip-net.ch/services/chat/faq_d.php"
putserv "PRIVMSG $n -"
putserv "PRIVMSG $n 1 Wie werde ich OP?"
putserv "PRIVMSG $n 2 Wie registriere ich meinen Nick?"
putserv "PRIVMSG $n 3 Wie registriere ich einen Channel?"
putserv "PRIVMSG $n 4 Wie lauten die Chatregeln?"
putserv "PRIVMSG $n 5 Was ist flood?"
putserv "PRIVMSG $n 6 Was ist ein Bot?"
putserv "PRIVMSG $n 7 Wie mache ich meinen eigenen Raum auf?"
putserv "PRIVMSG $n 8 Wie wechsel ich meinen Nick?"
putserv "PRIVMSG $n 9 Warum kann ich meinen Nick nicht wechseln?"
putserv "PRIVMSG $n 10 Warum kann ich in einem bestimmten Raum nicht mehr chaten?"
putserv "PRIVMSG $n 11 Weitere Informationen rund um den Vip-Net.Ch Chat."
putserv "PRIVMSG $n -"
putserv "PRIVMSG $n Bitte gib die gewünschte Nummer (hier im P-Fenster) mit !faq<nummer> an. (z.B. !faq3)"
} |
|
|
| Back to top |
|
 |
greenbear Owner
Joined: 24 Sep 2001 Posts: 733 Location: Norway
|
Posted: Sun Sep 11, 2005 12:56 pm Post subject: |
|
|
You still have that msg bind pointing to the same proc name.
You also forgot the : in the putserv msg's. |
|
| Back to top |
|
 |
Balkanac Voice
Joined: 15 Aug 2005 Posts: 12
|
Posted: Sun Sep 11, 2005 12:58 pm Post subject: |
|
|
And again with the ":"
| Code: | | [18:57] Tcl error [faq]: wrong # args: should be "faq n u h t" |
|
|
| Back to top |
|
 |
greenbear Owner
Joined: 24 Sep 2001 Posts: 733 Location: Norway
|
Posted: Sun Sep 11, 2005 1:01 pm Post subject: |
|
|
| You can't have both a msg and a pub bind pointing to the same proc, so unload the one you don't want, or if you need both, use different proc names. |
|
| Back to top |
|
 |
Balkanac Voice
Joined: 15 Aug 2005 Posts: 12
|
Posted: Sun Sep 11, 2005 1:04 pm Post subject: |
|
|
Thanks greenbear!
 |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Sun Sep 11, 2005 1:10 pm Post subject: |
|
|
| greenbear wrote: | | You can't have both a msg and a pub bind pointing to the same proc, so unload the one you don't want, or if you need both, use different proc names. |
actually, you can:
| Code: |
bind pub - !faq foo
bind msg - faq foo
proc foo {nick args} {
puthelp "notice $nick :<stuff>"
}
|
|
|
| Back to top |
|
 |
greenbear Owner
Joined: 24 Sep 2001 Posts: 733 Location: Norway
|
Posted: Sun Sep 11, 2005 1:36 pm Post subject: |
|
|
clever, never thought of that  |
|
| Back to top |
|
 |
|