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 

Two scripts brought together - .chattr + .adduser

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
Puck
Voice


Joined: 08 Mar 2008
Posts: 10
Location: Budapest, Hungary

PostPosted: Mon Mar 17, 2008 2:41 pm    Post subject: Two scripts brought together - .chattr + .adduser Reply with quote

Hi everyone.

Once again i need help from you guys too make a simple command out of two, that is, if i type .chattr nickname +flags the eggdrop adds the user to the userlist with the host *!*@vhost.domain.com and adds too him the +flags too the channel userlist. After these two commands are performed the eggdrop messages the nickname that has gained access that he has been succesfully added.

Here are the two scripts that i found, i hope it helps somehow, it`s from botcontrol3.2.tcl by Prince_of_the_net, so these codes arent mine at all.

Adduser:
Code:
proc bctrl:add_user {nick uhost hand chan text} {
    global logo botnick
    set person [lindex [split $text] 0]
    if {$person == ""} {
   puthelp "NOTICE $nick :You did not tell me the nick to be added :-(. The correct syntax is !adduser <nick_to_be_added>  $logo"
   return 0
    }
    set per_ip [getchanhost $person]
    set per_host [maskhost $person!$per_ip]
    set host [lindex [split $text] 1]
    if {$host == ""} {
   set host $per_host
    }
    set kadd [adduser $person $host]
    if {$kadd == 1} {
    putserv "NOTICE $nick :Successfully added $person with host $host  $logo"
    putserv "NOTICE $person :You were added to my user list by $nick with host $host.Please set up your password with /msg $botnick pass <ur_chosen_password>  $logo"
    } {
    putserv "NOTICE $nick :Error, could not add user $person, he already exists!!  $logo"
    }
}


Chattr:
Code:
proc bctrl:chatt_r {nick uhost hand chan text} {
    global logo
    set person [nick2hand [lindex [split $text] 0]]
    if {$person == ""} {
   puthelp "NOTICE $nick :You did not tell me the nick for whom the user flags are to be changed :-(. The correct syntax is !chattr <nick_to_be_modified> <flags> \[channel\]"
   puthelp "NOTICE $nick :The channel is optional.  $logo"
   return 0
    }
    set change [lindex [split $text] 1]
    set channel [lindex [split $text] 2]
    if {$channel == ""} {
   set chattz [chattr $person $change]
   putserv "NOTICE $nick :The global flags for $person are now: $chattz"
   putlog "Changing global"
   putserv "NOTICE $person :Your global flags are now: $chattz"
    } {
   set chattz [chattr $person |$change $channel]
   putserv "NOTICE $nick :The global flags, and channel flags in the format of global|channel for $person are now: $chattz  $logo"
    }
}


If you need the whole code it`s Here

P.S.: I removed the "$logo" from everywhere since it gives an error that the $logo variable is not found.
Back to top
View user's profile Send private message Visit poster's website
Alchera
Revered One


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

PostPosted: Mon Mar 17, 2008 10:39 pm    Post subject: Reply with quote

Have you tried to contact the author on DALnet or EFnet (as per details in the header)?
_________________
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
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests 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