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: Select all
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"
}
}
Code: Select all
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"
}
}
P.S.: I removed the "$logo" from everywhere since it gives an error that the $logo variable is not found.