Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

need script for eggdrop 1

Status
Not open for further replies.

gmbyron

IS-IT--Management
Apr 16, 2005
2
US
hello. i'm new here, please help me. i need script for my eggdrop bot
scrit should manage active users db.
example:

User with + (voice) messages bot "sign-on"
Bot answers OK, and adds user to DB

---

User with + (voice) says to bot "sign-off"
Bot answers OK, and deletes user from DB

---

When any user comes to channel, bot says him to private somehing like this "This ppl are active": and shows db, eg ":User1, User2"

Same shoulf be if user will say on channel "!active"

---


Please, help me with writing it. I'm full Zer0 in tcl...

Thnx in advance.
 
I think very few people here know eggdrop's internals well enough to code something like this.

Here is some pcode for you however to demonstrate how it might go if eggdrop has an api like this.
Code:
set badlist {bob jim fred ted gary sally jill foo}

proc addUser {vc} {
global badlist
              if {![lsearch -exact $badlist $vc]} {
                    #the following methods are fictitious 
                   eggdrop::add::db_user $vc                    
                   eggdrop::putuser $vc [eggdrop::active]
               }
               return -1
}

proc handleusermessage {vc msg} {
       #all the following procedures are undefrined             
       switch -exact $msg {
                                    
                   "add_connect" {return [do_foo $vc]}
                   "list_friends" {return [listbuddy $vc]}
                   "sign-off" {return [disconnect $vc]}
                   "!active" {return [eggdrop::getelapsed]}
        }
}

HTH



 
Hello. thnak you for answering, but this is not that.. That's not Eggdrop's api. But anyway thnx for answering.
 
Of course it's not..and that's what I said.
It's a clue and I hope you get it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top