What you need to do is "bind EVNT - init-server" and when this bind is triggered login to X and set the mode to +x.blood_x wrote:Hi all,
Recently, undernet has upgrade their IRC software to have utility to hiding their users hostname.
Anyone can make TCL script that can hide bot/eggdrop hostname, such as mentioned above.
Thanks.
Heh, I'm not an expert in these services eitherppslim wrote:From what I see on most networks (note, I aint no expert, and I don't use services), the service bots, are located as a seperate connection, into the network.
Requests to auth (even usign built-in server commands, rather than msg commands), are forwarded onto the service bot, before being confirmed.
As such, simply setting +x, straight after sending the auth command, would not allways work.
Part due to X not allways being there, and the rest, due to lag, and sending the +x mode too quickly after the auth command (IE, sending +x, before having permission to do so).
Code: Select all
bind notc - "AUTHENTICATION SUCCESSFUL*" xw_logged
# cut
proc xw_logged {cserv uhost handl logtext {target ""}} {
global log_x botnick
if {$target == ""} { set target $botnick }
set trimuh [string trimleft $uhost $cserv!]
if {$trimuh == "cservice@undernet.org"} {
set log_status [lindex $logtext 3]
putlog "÷ $log_status logged in to $cserv ($trimuh) ÷"
set log_x 1
}
}
Code: Select all
putserv "MODE $botnick +x"
Then copy and paste from here. If the X service is away/splitted/on vacation, users will prolly not be able to login to this service and can not get the username.users.undernet.org host. But, I'm not an avid undernet/X user so I don't know how often this happensblood_x wrote:Dear Egghead,
I can't download that tcl.
"Anyway, my work in progress is http://members.fortunecity.com/eggheadt ... ex.tcl.txt"
Hum, if X is split for a long time or vacation, I think it is difficult for eggdrop to recognize user by that hostname, rite.. wow, undernet coder should fixed it.. more to server options, not to X..
Anyway I need this TCL to research this mode on undernet.org server..
Thanks.
Code: Select all
#---------------------------------------------------------------------
# undernetmodex.tcl
# Tcl script for IRC bot eggdrop
#
# This script logs the bot into the X service on undernet and sets
# usermode +x.
# The bot will be visible with the uhost username.users.undernet.org
#
# v0: 16-Oct-2002
# v1: 16-Oct-2002
# + send out a "WHOIS botnick" to update the botname.
#---------------------------------------------------------------------
# set these variables in the main config file just before sourcing
# this tcl.
# Do not set these variables in this script.
# set undernetusername hello
# set undernetpassword world
package require eggdrop 1.6
package require Tcl 8.0
bind EVNT - init-server undernetmodex:init
bind TIME - * undernetmodex:time
proc undernetmodex:init { args } {
# login
undernetmodex:login
}
proc undernetmodex:time { args } {
# check every 15 minutes
set secs [clock seconds]
set mins [expr round($secs/60.0)]
if {[expr $mins % 15]} { return 0 }
# login
undernetmodex:login
}
proc undernetmodex:login { args } {
global botname
global botnick
global undernetusername
global undernetpassword
# check current botname
set currenthost [lindex [split $botname "@"] 1]
append desiredhost $undernetusername ".users.undernet.org"
if { $currenthost == $desiredhost } { return 0 }
# username and password exist?
if {![info exists undernetusername]} {
putlog "Login to X failed: Undernet username does not exist."
return 0
}
if {![info exists undernetpassword]} {
putlog "Login to X failed: Undernet password does not exist."
return 0
}
# login and mode +x
set X {X@channels.undernet.org}
putserv "PRIVMSG $X :LOGIN $undernetusername $undernetpassword"
putserv "MODE $botnick +x"
# It seems that "botname" is not updated after connecting to
# the server. Subsequently, if the login procedure failed upon
# connecting to the server, comparing the botname with the
# desired name will always fail and the bot will continue to
# attempt to login to X and change mode +x.
# Workaround: send out a WHOIS and let the bot process the result.
puthelp "WHOIS $botnick"
}
putlog "UndernetModeX version 1 loaded."
If X is dead, there is not much you can do anywayblood_x wrote: Thx for the script and it work on undernet.org when X is alive but do not know if X is dead.. hehe![]()
The straightforward thing to do is to set the need-op variable using .chanset.When I add to my eggdrop, it works 100% for mode +x, but when I -o (deop) my eggdrop, my bot cannot op himself through X. Can u set, when someone deop my eggdrop, my bot will automatically +o via privmsg to X again or by adding more short time (in seconds) to check whether my bot ischanop or not..
For example:
MyBot!myident@myusername.users.undernet.org has join #mychannel
X set mode +o MyBot
X set mode -o Mybot (request by other users)
X set mode +o MyBot <- Automatically rescan if mybot doesn't have an op
Thanks.
Hmm.. thats a weird error message you get from fortunecity. It seems it is time to move my scripts somewhere else again.blood_x wrote:I can't download that file too..When I enter ur website, the msg below appears;
We're sorry, but we can't supply the file you requested.
In order for us to continue to provide our members with the first-class service they expect, we don't allow people to link files from sites hosted with other providers.
Nevemind, u can paste ur script here. I have .chanset #mychan need-op putserv "PRIVMSG X op mybotnick" but it doesn't work effectively.. (Long time to wait for mybot to request op again if using .chanset need-op..) Then, i decide to combine Umodex.tcl (written by you) and ucsx.tcl (written by Don norske, update by MC_8), and it work fine.. but i dun know the impact of using 2 TCL login script for 1 IRC server.. hehe
Code: Select all
#---------------------------------------------------------------------
# dalnetneedop.tcl
# TCL script for IRC bot eggdrop
#
# This scripts attempts to keep the bot opped on the dalnet channels
# the bot monitors.
# The bot must be able to get operator status on each channel
# through chanserv.
#
# v0: 15-May-2002
#---------------------------------------------------------------------
package require eggdrop 1.6.9
#---------------------------------------------------------------------
# Bindings
#---------------------------------------------------------------------
bind need - * dalnetneedop
#---------------------------------------------------------------------
# Procedure triggered by need binding
#---------------------------------------------------------------------
proc dalnetneedop { channel type } {
global botnick
global dalnetneedopstamp
# check the need type...
if { $type != "op" } { return }
# Use timestamp to avoid too many requests for +o in case of
# "mode -ooo botnick botnick botnick".
# Possibly eggdrop's queue system removes the identical
# requests send to chanserv anyway.
if {![info exists dalnetneedopstamp]} { set dalnetneedopstamp 0 }
set chantime "$channel [unixtime]"
if { $chantime == $dalnetneedopstamp } { return }
set chanserv chanserv@services.dal.net
putserv "PRIVMSG $chanserv :OP $channel $botnick"
set dalnetneedopstamp $chantime
}
putlog "Dalnet needop version 0 loaded."