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 

execute eggdrop error

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


Joined: 02 May 2010
Posts: 2

PostPosted: Sun May 09, 2010 6:28 am    Post subject: execute eggdrop error Reply with quote

I give the error in execute eggdrop.


Code:
[11:27] wrong # args: should be "proc name args body"
    while executing
"proc auth { nick uhost hand arg } {
global botnick ci cf db mainchan mainchanpvt modeauth

set d [::mysql::connect -host $bdhost -user $bduser -passwo..."
    (file "scripts/test.tcl" line 13)
    invoked from within



Code:
bind msg - auth auth

set bdhost "localhost"
set bduser "user"
set bdpass "pass"
set bdname "bd"
set modeauth 1
set ci "0,1\[7«0"
set cf "7»0\]"
set mainchan "#main"
set mainchanpvt "#pvt"

proc auth { nick uhost hand arg } {
global botnick ci cf db mainchan mainchanpvt modeauth

set d [::mysql::connect -host $bdhost -user $bduser -password $bdpass]
set db [::mysql::use $d $dbname]

if { $modeauth == 1 } {
if {[onchan $nick $mainchan]} {
   if { [::mysql::sel $db "SELECT auth FROM users WHERE ircnick='[string tolower $nick]' AND ircstatus='1'"] == "1" } {
   puthelp "PRIVMSG $nick :$ci Tu já estas autenticado! $cf"
   } else {
   set auth [string tolower [lindex [split $arg] 0]]
   set pass [md5 [string tolower [lindex [split $arg] 1]]]
      if { $txt == "" } {
         puthelp "PRIVMSG $nick :$ci Comando inválido, para te autenticares usa /msg $botnick auth <nick> <pass> $cf"
      } else {
         if { $pass == "" } {
            puthelp "PRIVMSG $nick :$ci Comando inválido, para te autenticares usa /msg $botnick auth <nick> <pass> $cf"
            } else {
            if {[join [::mysql::sel $db "SELECT password FROM users WHERE auth='$auth'" -list]] == $pass } {
               set check [join [::mysql::sel $db "SELECT ircstatus FROM users WHERE auth='$auth'" -list]]
               if { $check == 1 } {
               set authednick [::mysql::sel $db "SELECT ircnick FROM users WHERE auth='$auth'" -list]
               putserv "privmsg $authednick :$ci O utilizador $nick fez auth na tua conta(#$auth). Deixas-te de estar autenticado $cf"
               }
               set result [::mysql::exec $db "UPDATE users SET ircstatus='1' WHERE auth='$auth'"]
               set result [::mysql::exec $db "UPDATE users SET ircnick='$nick' WHERE auth='$auth'"]
               set level [::mysql::sel $db "SELECT level FROM users WHERE auth='$auth'" -list]
               puthelp "PRIVMSG $nick :$ci Estás agora autenticado como $auth $cf"
               set auth [::mysql::sel $db "SELECT auth FROM users WHERE ircnick='$nick' AND ircstatus='1'" -list]
               }
            } else {
            putserv "privmsg $mainchanpvt : Tentativa de login falhado por $nick (Auth: #$auth)"
            puthelp "PRIVMSG $nick :$ci Password/nick inválido, para te autenticares usa /msg $botnick auth <nick> <pass>  $cf"
            }
         }
      }
   }
   } else {
   puthelp "PRIVMSG $nick :$ci Precisas de estar no canal $mainchan para fazer auth $cf"
}
} else {
puthelp "PRIVMSG $nick :$ci Esta funcão foi desactivada $cf"
}
}


any idea ?
thanks.
Back to top
View user's profile Send private message
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