I find some tcl's that convert some dcc commands in public commands but modifications make that scripts broken or useless<me> .+host User1 *!*@new-hostname.tld
<Bot> *!*@new-hostname.tld added to User1
Thanks.
I find some tcl's that convert some dcc commands in public commands but modifications make that scripts broken or useless<me> .+host User1 *!*@new-hostname.tld
<Bot> *!*@new-hostname.tld added to User1
The script it's tested and working fine. Feel free to modify.bind pub o "+host" pub:addhost
#that's for user
bind pub n ".+host" pub:changehost
#that's for bots or other people
proc pub:addhost { nick userhost hand chan host } {
if {$host == ""} {
puthelp "privmsg $chan :+host <your-new-hostname>"
return 0
}
set hostname [lindex $host 0]
addhost $hand $hostname
puthelp "privmsg $chan :Added hostname $hostname to $hand"
}
proc pub:changehost { nick userhost hand chan text } {
set handle [lindex $text 0]
set newhost [lindex $text 1]
if {$text == ""} {
puthelp "privmsg $chan :.+host <handle> <new-hostname> (to see a handle use: !whois <nickname>)"
return 0
}
addhost $handle $newhost
puthelp "privmsg $chan :Added hostname $newhost to $handle "
}
putlog "Addhost Loaded"
can't remember I've seen a remhots/delhost command, perhapse it was being provided by some other script?getuser <handle> <entry-type> [extra info]
Description: an interface to the new generic userfile support. Valid
entry types are:
BOTFL - returns the current bot-specific flags for the user
(bot-only)
BOTADDR - returns a list containing the bot's address, telnet port,
and relay port (bot-only)
HOSTS - returns a list of hosts for the user
LASTON - returns a list containing the unixtime last seen and the
last seen place. LASTON #channel returns the time last
seen time for the channel or 0 if no info exists.
INFO - returns the user's global info line
XTRA - returns the user's XTRA info
COMMENT - returns the master-visible only comment for the user
EMAIL - returns the user's e-mail address
URL - returns the user's url
HANDLE - returns the user's handle as it is saved in the userfile
PASS - returns the user's encrypted password
Returns: info specific to each entry-type
Module: core
setuser <handle> <entry-type> [extra info]
Description: this is the counterpart of getuser. It lets you set the
various values. Other then the ones listed below, the entry-types are
the same as getuser's.
PASS - sets a users password (no third arg will clear it)
HOSTS - if used with no third arg, all hosts for the user will be
be cleared. Otherwise, *1* hostmask is added
LASTON - This setting has 3 forms. "setuser <handle> LASTON
<unixtime> <place>" sets global LASTON time, "setuser
<handle> LASTON <unixtime>" sets global LASTON time
(leaving the place field empty), and "setuser <handle>
LASTON <unixtime> <channel>" sets a users LASTON time for
a channel (if it is a valid channel).
Returns: nothing
Module: core
Code: Select all
# remhost <user> <hostmask>
#returns 1 if ok, 0 if not
proc remhost {user host} {
if {([validuser $user]) && ([set ind [lsearch -exact [set hostlist [getuser $user HOSTS]] $host]] != -1)} {
set hostlist [lreplace $hostlist $ind $ind]
foreach {h} $hostlist { setuser $user HOSTS $h }
return 1
} else {
return 0
}
}