| View previous topic :: View next topic |
| Author |
Message |
Zest Voice
Joined: 15 Aug 2005 Posts: 3
|
Posted: Sun Jan 01, 2006 7:44 am Post subject: I have write a litlle url script but need help |
|
|
Hello
first, sorry for bad englisch.
I have a Problem with my little script.
| Code: | proc achan {cchan} {
set activechans "#chan1 und #chan2"
if {[string length $activechans] > 0} {
if {[string first [string tolower $cchan] $activechans] < 0} {
return no_achan
}
}
}
proc putnot {nick msg} { putserv "NOTICE $nick :$msg" }
proc putchan {chan msg} { putserv "PRIVMSG $chan :$msg" }
proc pub_!urls {nick uhost hand chan rest} {
if {([achan $chan] != "no_achan")} {
global botnick
set cmd [string tolower [lindex $rest 0]]
if {$cmd == ""} {
putchan $chan "\001ACTION hat Folgende URLs im Detail. Abrufen mit: !blabla1, !blabla2, !blabla3, !blabla4 \001" ;return 0}
}
}
bind pub - !urls pub_!urls
proc pub_!blabla1 {nick uhost hand chan rest} {
if {([achan $chan] != "no_achan")} {
global botnick
set cmd [string tolower [lindex $rest 0]]
if {$cmd == ""} {
putchan $chan "\001ACTION Folgende details zu blabla1 verfügbar: Webseite http://*****.de den Chat dazu im Aplett im Forum ganz unten.\001" ;return 0}
}
}
bind pub - !blabla1 pub_!blabla1
proc pub_!blabla2 {nick uhost hand chan rest} {
if {([achan $chan] != "no_achan")} {
global botnick
set cmd [string tolower [lindex $rest 0]]
if {$cmd == ""} {
putchan $chan "\001ACTION: Folgende details zu blabla2 verfügbar: Webseite: http://www.*****.de den Chat findet ihr im **** unter #**** .\001" ;return 0}
}
}
bind pub - !blabla2 pub_!blabla2
proc pub_!blabla3 {nick uhost hand chan rest} {
if {([achan $chan] != "no_achan")} {
global botnick
set cmd [string tolower [lindex $rest 0]]
if {$cmd == ""} {
putchan $chan "\001ACTION Folgende details zu blabla3 verfügbar: Webseite: http://www.****.ch den Chat dazu findet ihr im **** unter #**** oder für Gäste im Aplett in der Navigation.\001" ;return 0}
}
}
bind pub - !blabla3 pub_!blabla3
proc pub_!blabla4 {nick uhost hand chan rest} {
if {([achan $chan] != "no_achan")} {
global botnick
set cmd [string tolower [lindex $rest 0]]
if {$cmd == ""} {
putchan $chan "\001ACTION Folgende details zu blabla4 verfügbar: Webseite: http://www.****.de den Chat dazu findet ihr im **** unter #***** .\001" ;return 0}
}
}
bind pub - !blabla4 pub_!blabla4
###
putlog "URL Service von Zest" |
Now the Problem is:
The Bot don't accept more than 3 Url's.
Normal, with these script is possible to write more tan 50 Url's.
Ex:
blabla3 don't work but the rest when i write in chan !blabla1 or !blabla4, works perfect. The sort of !blabla is not a problem.
hope you can help.
Greet |
|
| Back to top |
|
 |
De Kus Revered One

Joined: 15 Dec 2002 Posts: 1361 Location: Germany
|
Posted: Mon Jan 02, 2006 3:43 pm Post subject: |
|
|
LOL, what a script. Has it been converted from an mIRC script or something like that? I mean, would it be more clear, if you used only 1 proc, used a normal string match or lsearch for chan checking, and seltected the output line via a switch construct?
btw... what does mean it doesnt work? any TCL errors? maybe you made a typo or something like that.
*puts up a sign: "geht nicht" ist keine Fehlerbeschreibung* _________________ De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens... |
|
| Back to top |
|
 |
Zest Voice
Joined: 15 Aug 2005 Posts: 3
|
Posted: Mon Jan 02, 2006 3:51 pm Post subject: |
|
|
i found the error.
"\001ACTION:
right is:
"\001ACTION
No its not convertet from mirc. |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Mon Jan 02, 2006 7:00 pm Post subject: |
|
|
| Code: | | putserv "PRIVMSG $chan :\001ACTION blah blah\001" |
_________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
|