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 

Store selected information.

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive
View previous topic :: View next topic  
Author Message
Liteqh
Voice


Joined: 17 Oct 2005
Posts: 1

PostPosted: Mon Oct 17, 2005 8:32 am    Post subject: Store selected information. Reply with quote

Hi, im running a bnc company and im getting tired of users asking to change their passwords as they forget them. Is there a possibility that i can get a script that would store the information i tell it to, like i start a task with the bot lik $startstore and then type $email blah@blah.com and so on untill i have added the the information i need then close it with $endstore. I have also toy'd with the idea of having it in one big file rather than a file per client, just add perhaps a $search feature that would go through the file and show me the results of the matching details.

Thankyou in advance.
Back to top
View user's profile Send private message
greenbear
Owner


Joined: 24 Sep 2001
Posts: 733
Location: Norway

PostPosted: Mon Oct 17, 2005 11:09 am    Post subject: Reply with quote

yea this is sooooo related to eggdrop
Back to top
View user's profile Send private message Send e-mail
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Mon Oct 17, 2005 12:50 pm    Post subject: Reply with quote

Try
Code:
# File
set bncinfofile "scripts/bncinfo.txt"

# Information
set bncinfo {name email password}

bind msg n bncadd bnc:info:add
bind msg n bncget bnc:info:get

proc bnc:info:add {nick uhost hand arg} {
 global bncinfofile bncinfo
  set c 0
  foreach i $bncinfo {
   append info "$i: [lindex [split $arg] $c] "
   incr c
  }
  puts [set f [open $bncinfofile a]] $info
  close $f
}
 
proc bnc:info:get {nick uhost hand arg} {
 global bncinfofile
 foreach i [split [read [set f [open $bncinfofile]]] \n][close $f] {
  if {[string equal -nocase [lindex $i 1] [lindex [split $arg] 0]]} {
   puthelp "notice $nick :$i" ; set found 1
   break
  }
 }
 if {![info exists found]} {
  puthelp "notice $nick :[lindex [split $arg] 0] was not found in the DB."
 }
}

SYNTAX:
bncadd <name> <email> <password> (depends on "set bncinfo")
bncget <name>
_________________
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:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive 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