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 

I have write a litlle url script but need help

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
Zest
Voice


Joined: 15 Aug 2005
Posts: 3

PostPosted: Sun Jan 01, 2006 7:44 am    Post subject: I have write a litlle url script but need help Reply with quote

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
View user's profile Send private message
De Kus
Revered One


Joined: 15 Dec 2002
Posts: 1361
Location: Germany

PostPosted: Mon Jan 02, 2006 3:43 pm    Post subject: Reply with quote

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? Very Happy

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
View user's profile Send private message MSN Messenger
Zest
Voice


Joined: 15 Aug 2005
Posts: 3

PostPosted: Mon Jan 02, 2006 3:51 pm    Post subject: Reply with quote

i found the error.
"\001ACTION:
right is:
"\001ACTION

No its not convertet from mirc.
Back to top
View user's profile Send private message
Alchera
Revered One


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

PostPosted: Mon Jan 02, 2006 7:00 pm    Post subject: Reply with quote

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
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 -> Scripting Help 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