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 

vhost help

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
Arnold_X-P
Op


Joined: 30 Oct 2006
Posts: 144
Location: DALnet - Trinidad - Beni - Bolivia

PostPosted: Sat Apr 01, 2017 1:57 pm    Post subject: vhost help Reply with quote

I found this tcl and tried to arrange it but it has a very repetitive error

Code:
# based in http://forum.egghelp.org/viewtopic.php?t=13836&highlight=vhost
#set this to channel
set scan(chan) "#vhost"
# Set this to the bot's O-Line username #
set oper(username) "xxx"
# Set this to the bots O-Line password #
set oper(password) "xxxx"
# Set here the words that are not alowed in the vhost #
set dvb_badvhost {
   "*admin*"
   "*bitch*"
   "*operator*"
   "*ircop*"   
   "Marro*"
   "*Maro*"
   "*netadmin*"
   "*N3TADM1N*"
   "**"
   "*^"
   "*+"
   "*"
   "*<"
   "*#*"
   "*irc0p*"
   "*Opers*"
   "*`"
   "*&"
   "*"
   "*"
}

## dont change below unless your know what your doing ##

bind msg o oper oper-up
bind join - "$scan(chan) *" tls:join

bind raw - 307 tls:ident
bind pub -|- !vhost tls:vhost
bind pub -|- .vhost tls:vhost
bind evnt - init-server oper:connect

proc oper:connect init-server {
putserv "OPER $::oper(username) $::oper(password)"
putserv "ns identify benita28"
}

proc oper-up {nick host chan text} {
  global operid operpass owner2
  putserv "OPER $::oper(username) $::oper(password)"
  putserv "NOTICE $nick :I Opered up"
}

proc tls:join {nick host hand chan} {
 global tls_nick tls_ident botnick
 if {![string match -nocase *$nick* $botnick]} {
  set tls_ident "1"
  set tls_nick $nick
  putserv "WHOIS $nick"
  utimer 3 tls:not:ident
} }

proc tls:vhost {nick host hand chan vhost} {
 global tls_nick tls_ident tls_vhost
   if {$chan != "$::scan(chan)"} {
      putserv "NOTICE $nick :\2$nick\2 Don't Use This Command Outside $::scan(chan)"
   return 0
  }
 if {$vhost == ""} {
  if {$chan == "$::scan(chan)"} {
 putserv "PRIVMSG $chan :With the command 4!vhost you can make a vhost."
 putserv "PRIVMSG $chan :Do it this way, 4!vhost This.is.my.vhost.com"
  putserv "PRIVMSG $chan :You can only use this service if you have your nick registered and identified"
  putserv "PRIVMSG $chan :For more information type 4/MSG nickserv HELP"
   return 0
  }
 }
  set tls_ident "2"
  set tls_vhost [lindex $vhost 0]
  set tls_nick $nick
  putserv "WHOIS $nick"
  utimer 3 tls:not:ident
}

proc tls:ident {from key args } {
 global tls_ident tls_nick tls_vhost 
  set args [join $args]
  set nick [string tolower [lindex $args 1]]
  set regist [strlwr [lindex [lrange [split $args ":"] 1 end] 0]]
  if {$tls_ident == "1" && $regist == "is identified for this nick"} {
    foreach j [utimers] {
        if {[lindex $j 1] == "tls:not:ident"} { killutimer [lindex $j 2] }
      }
  putserv "PRIVMSG $::scan(chan) :$nick your nick is registered and identified use 4!vhost <vhost>"
   }
  if {$tls_ident == "2" && $regist == "is identified for this nick"} {
    foreach j [utimers] {
        if {[lindex $j 1] == "tls:not:ident"} { killutimer [lindex $j 2] }
   }
   
  global dvb_badvhost
foreach i $dvb_badvhost {
if {[string match -nocase $i $tls_vhost]} {
 putserv "PRIVMSG $::scan(chan) :Your vhost is not changed 3$tls_vhost3"
  putserv "PRIVMSG $::scan(chan) :Its not a valid vhost 3$tls_vhost for 3$i"
   return 0
  } 
 }
  putserv "PRIVMSG hostserv : set $tls_nick $tls_vhost"
  putserv "chghost $tls_nick $tls_vhost"
  putserv "NOTICE $tls_nick :Your vhost is changed in 3$tls_vhost3"
  putserv "NOTICE $tls_nick :Type 4/msg hostserv on"
  unset j ; unset tls_nick ;
  }
  return 0
}

proc tls:not:ident {} {
 global tls_nick
 putserv "PRIVMSG $::scan(chan) :\2$tls_nick\2 is not registered or identified."
 putserv "PRIVMSG $::scan(chan) :Type: 4/MSG nickserv HELP for info how to register and identify you nick."
 return 0
}

putlog "vhost was successfully loaded."

the error is apparently the time that sees the user and repeats it [utimers]


[12:21] <&sicario> spencer your nick is registered and identified use 4!vhost <vhost>
[12:21] <&sicario> spencer your nick is registered and identified use 4!vhost <vhost>
and the error that detects this one in the line 90 91 and 96 97

some friend who wants to help in solving this tcl please.
_________________
Very Happy thanks to that they help, that others learn Very Happy
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Arnold_X-P
Op


Joined: 30 Oct 2006
Posts: 144
Location: DALnet - Trinidad - Beni - Bolivia

PostPosted: Sun Oct 29, 2017 8:47 pm    Post subject: Re: vhost help Reply with quote

Final code
only works for anope services & Unreal3.2.* ... Remember also for the tcl to work your bot must have access to ircop
Code:
# based in http://forum.egghelp.org/viewtopic.php?t=13836&highlight=vhost
# updated for Arnold_X-P email urquizoandrade@hotmail.com /server irc.dal.net channel #tcls my nick's Arnold_X-P & sedition 29/OCT/2017
# tambien estoy en irc.chatzona.org canal #eggdrop.conf mi correo urquizoandrade@hotmail.com mis nicks Arnold_X-P y sedition
#set this to channel
set scan(chan) "#vhost"
# Set this to the bot's O-Line username #
set oper(username) "you-opernick"
# Set this to the bots O-Line password #
set oper(password) "you-pass-ircop"
# Set here the words that are not alowed in the vhost #
set dvb_badvhost {
   "*admin*"
   "*bitch*"
   "*operator*"
   "*ircop*"   
   "*netadmin*"
   "*N3TADM1N*"
   "**"
   "*^*"
   "*+*"
   "**"
   "*<*"
   "*#*"
   "*irc0p*"
   "*Opers*"
   "*`*"
   "*&*"
   "**"
   "**"
   "*,*"
}

## dont change below unless your know what your doing ##

bind msg o oper oper-up
bind join - "$scan(chan) *" tls:join

bind raw - 307 tls:ident
bind pub -|- !vhost tls:vhost
bind pub -|- .vhost tls:vhost
bind evnt - init-server oper:connect

proc oper:connect init-server {
putserv "OPER $::oper(username) $::oper(password)"
}

proc oper-up {nick host chan text} {
  global operid operpass owner2
  putserv "OPER $::oper(username) $::oper(password)"
  putserv "NOTICE $nick :I Opered up"
}

proc tls:join {nick host hand chan} {
 global tls_nick tls_ident botnick
 if {![string match -nocase *$nick* $botnick]} {
  set tls_ident "1"
  set tls_nick $nick
  putserv "WHOIS $nick"
  utimer 3 tls:not:ident
} }

proc tls:vhost {nick host hand chan vhost} {
 global tls_nick tls_ident tls_vhost
   if {$chan != "$::scan(chan)"} {
      putserv "NOTICE $nick :\2$nick\2 Don't Use This Command Outside $::scan(chan)"
   return 0
  }
 if {$vhost == ""} {
 if {$chan == "$::scan(chan)"} {
 putserv "PRIVMSG $chan :With the command 4!vhost you can make a vhost."
 putserv "PRIVMSG $chan :Do it this way, 4!vhost This.is.my.vhost.com"
  putserv "PRIVMSG $chan :You can only use this service if you have your nick registered and identified"
  putserv "PRIVMSG $chan :For more information type 4/MSG nickserv HELP"
   return 0
  }
 }
  set tls_ident "2"
  set tls_vhost [lindex $vhost 0]
  set tls_nick $nick
  putserv "WHOIS $nick"
  utimer 3 tls:not:ident
}

proc tls:ident {from key args } {
 global tls_ident tls_nick tls_vhost
  set args [join $args]
  set nick [string tolower [lindex $args 1]]
  set regist [strlwr [lindex [lrange [split $args ":"] 1 end] 0]]
  if {$tls_ident == "1" && $regist == "is identified for this nick"} {
 foreach j [utimers] {
   if {[lindex $j 1] == "tls:not:ident"} { killutimer [lindex $j 2] }
   continue }
  putserv "PRIVMSG $::scan(chan) :$nick your nick is registered and identified use 4!vhost <vhost>"
   }
  if {$tls_ident == "2" && $regist == "is identified for this nick"} {
 foreach j [utimers] {
    if {[lindex $j 1] == "tls:not:ident"} { killutimer [lindex $j 2] }
   continue }

  global dvb_badvhost
foreach i $dvb_badvhost {
if {[string match -nocase "$i" $tls_vhost]} {
 putserv "PRIVMSG $::scan(chan) :Your vhost is not changed 3$tls_vhost3"
  putserv "PRIVMSG $::scan(chan) :Its not a valid vhost 3$tls_vhost for 3$i"
   return 1
  } }
  putserv "PRIVMSG hostserv : set $tls_nick $tls_vhost"
  putserv "chghost $tls_nick $tls_vhost"
  putserv "NOTICE $tls_nick :Your vhost is changed in 3$tls_vhost3"
  putserv "NOTICE $tls_nick :Type 4/msg hostserv on"
  }
  return 0
}

proc tls:not:ident {} {
 global tls_nick
 putserv "PRIVMSG $::scan(chan) :\2$tls_nick\2 is not registered or identified."
 putserv "PRIVMSG $::scan(chan) :Type: 4/MSG nickserv HELP for info how to register and identify you nick."
}

putlog "vhost was successfully loaded. updated for Arnold_X-P (DALnet)"

_________________
Very Happy thanks to that they help, that others learn Very Happy
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help 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