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 

procedure not being ran, :(

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


Joined: 22 Dec 2005
Posts: 1

PostPosted: Thu Dec 22, 2005 4:28 pm    Post subject: procedure not being ran, :( Reply with quote

Code:
proc web:check {account} {
    egghttp:geturl http://caleague.com/?page=calclub&standalone=1&authserv_account=[set account] web:verify
}
proc web:verify {sock} {
 set headers [egghttp:headers $sock]
 set body [egghttp:data $sock]
 putlog "Body: $body"
 if {![string match -nocase "Authserv account not in database" [set body]]} {
  if {[string match -nocase *<division>* $body]} {
   foreach line [split $body \n] {
    if {[string match -nocase <division> $line]} {
     lappend division $line
    }
   }
   putlog "$division"
   if {[string match -nocase #calclub-im $::invite(chan)} {
    if {[string match -nocase csp $division] || [string match -nocase csm $division] || [string match -nocase csim $division]} {
     puthelp "INVITE $::invite(user) #calclub-im"
     puthelp "PRIVMSG $::invite(user) :You have been invited to join #CALClub-IM"
    } else {
     puthelp "PRIVMSG $::invite(user) :You are not CS 1.6 Intermediate+"
    }
   }

  } else {
   puthelp "PRIVMSG $::invite(user) :You are not currently in a CS 1.6 Division."
  }
 } else {
   puthelp "PRIVMSG $::invite(user) :Your AuthServ account does not exist in the CAL database. Please edit your CAL user profile and wait up to 3 hours for the database to reset."
 }
}

proc msg:inviteme {nick uhost handle text} {
  if {[string match -nocase *@*.*.gamesurge $uhost]} {
    if {[llength $text] == "2"} {
      puthelp "PRIVMSG $nick :Checking your current leagues."
      global invite
      set invite(user) [set nick]
      set invite(chan) [lindex $text 2]
      set uhost2 [lindex [split $uhost @] 1]
      set account [lindex [split $uhost2 .] 0]
      web:check $account
    } else {
      puthelp "PRIVMSG $nick :Syntax Error. Correct Syntax: .inviteme #channel"
    }
  } else {
    puthelp "PRIVMSG $nick :You must be using mode +x (Host Hiding) to be invited"
  }
}


web:verify procedure isnt ever being ran - Is this something simple that I'm over looking?
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Thu Dec 22, 2005 8:23 pm    Post subject: Reply with quote

It is being called by the egghttp:geturl command.
_________________
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