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 

no services tcl help

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


Joined: 04 Mar 2006
Posts: 8
Location: Bulgaria/Bourgas

PostPosted: Wed Dec 27, 2006 1:37 am    Post subject: no services tcl help Reply with quote

Code:

set services "1"
unbind dcc o|o msg *dcc:msg
bind dcc o|o msg csdostup
bind dcc n putserv putsrv
bind msg - ident identche


proc csdostup {hand idx arg} {
global services
       set tonick [string tolower [lindex $arg 0]]
       set mschan [string tolower [lindex $arg 2]]
       set text [lrange $arg 1 end]
          if {[matchattr $hand n|n $mschan]} {
             putlog "PRIVMSG from $hand to $tonick :$text"
             putserv "PRIVMSG $tonick :$text "
             putdcc $idx "msg to $tonick: $text"
             return 0
        }
         if {[matchattr $hand m]} {
          if {($tonick == "cs") || ($tonick== "ns") } {
              putdcc $idx "$hand, trqbva da bydesh moj owner za da ima dostyp"
              chattr $hand -afop+dk
              setuser $hand comment "Opital se da prati syobshtenie na $tonick s text: $text"
              putlog "$hand se opita da prati syobshtenie kym $tonick s text: $text"
              boot $hand "Opitva se da prati syobshtenie na $tonick s text: $text"
              putlog "$hand e mahnat ot bota"
              newban $hand!*@* $::botnick "Opitva se da prati syobshtenie na $tonick s text: $text"
              putlog "Dobawen e ban na $hand poradi ne spazvane na pravilata"
              dcc_flagnote $botnick 666 "$idx +n pedal"
              putlog "Izprashtat se notes do owners...."             
             
         } else {
              putlog "PRIVMSG from $hand to $tonick :$text"
              putserv "PRIVMSG $tonick :$text "
              putdcc $idx "msg to $tonick: $text"
         }
         return 0
         }
         putdcc $idx "$hand, trqbva da bydesh moj owner ili master za da imash dostyp"
         chattr $hand -afop+dk
         setuser $hand comment "Opital se da prati syobshtenie na $tonick s text: $text"
         putlog "$hand se opita da prati syobshtenie kym $tonick s text: $text"
         boot $hand "Opitva se da prati syobshtenie na $tonick s text: $text"
         putlog "$hand e mahnat ot bota"
         newban $hand!*@* $::botnick "Opitva se da prati syobshtenie na $tonick s text: $text"
         putlog "Dobawen e ban na $hand poradi ne spazvane na pravilata"
         dcc_flagnote $::botnick 666 "$idx +n pedal"
         putlog "Izprashtat se notes do owners...."             
         
 }

Ok now this tcl has to do this things:
Only master and owners can use .msg cs/ns <text>
If someone else do this they will be: there flags will be changed to +dk
they will be booted from the partyline and they will be banned and the bot have to send a note to all the owners
the only thing that don't works is the sendnote
here is the error that appears:
Code:
Tcl error [csdostup]: invalid idx
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Alchera
Revered One


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

PostPosted: Wed Dec 27, 2006 6:01 am    Post subject: Reply with quote

From tcl-commands.doc:
Quote:
sendnote <from> <to[@bot]> <message>
Description: simulates what happens when one user sends a note to another
Returns:
0 - the send failed
1 - the note was delivered locally or sent to another bot
2 - the note was stored locally
3 - the user's notebox is too full to store a note
4 - a Tcl binding caught the note
5 - the note was stored because the user is away
Module: core

_________________
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: Wed Dec 27, 2006 10:50 am    Post subject: Reply with quote

That error has nothing to do with the [sendnote] command; You're probably using the idx after booting the user which makes the idx not valid anymore.

Show us complete errorInfo.
_________________
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 -> 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