This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

VHOST

Support & discussion of released scripts, and announcements of new releases.
Post Reply
d
doc
Voice
Posts: 2
Joined: Sun Jul 29, 2007 12:42 pm

VHOST

Post by doc »

hi guys
not up on coding but im trying one of the scripts off your site and seems to work fine as far as setting a vhost but when it comes to not allowing one due to the disalow list it come up with the error in the bot

Tcl error [tls:ident]: can't read "chan": no such variable

as i say it works fine as far as setting one but when it come to the words in the badvhost i get that error

Code: Select all

#set this to channel 
set scan(chan) "#vhost" 
# Set this to the bot's O-Line username # 
set oper(username) "*******" 
# Set this to the bots O-Line password # 
set oper(password) "*****" 
# Set here the words that are not alowed in the vhost # 
set dvb_badvhost { 
   "*admin*" 
   "*bitch*" 
   "*operator*" 
   "*ircop*"    
   "*FutureForce*" 
   "*Future*" 
   "*C0mPl3x*" 
   "*ComPlex*" 
   "*Marro*" 
   "*Maro*" 
   "*netadmin*" 
   "*N3TADM1N*" 

} 



## 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 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 
  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 scan(chan) 
     if {$chan != "#vhost"} { 
      putserv "NOTICE $tls_nick : Don't Use This Command Outside #vhost" 
      return 0 
   } 
 if {$vhost == ""} { 
 if {$chan == "#vhost"} { 
   putserv "PRIVMSG $chan : With the command 4!VHOST you can make a vhost." 
   putserv "PRIVMSG $chan : Do it this way, !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 /msg nickserv HELP" 
   putserv "PRIVMSG $chan : 4  " 
   return 0 
   } 
      putserv "NOTICE $tls_nick : Met het commando 4!VHOST kan u een vhost instellen." 
      putserv "NOTICE $tls_nick : Dit commando kunt u echter alleen gebruiken in #vhost" 
      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 a registered nick"} { 
    foreach j [utimers] { 
        if {[lindex $j 1] == "tls:not:ident"} { killutimer [lindex $j 2] } 
      } 
   putserv "PRIVMSG #vhost :$nick your nick is registered and identified use !vhost <vhost>" 
   } 
  if {$tls_ident == "2" && $regist == "is a registered nick"} { 
    foreach j [utimers] { 
        if {[lindex $j 1] == "tls:not:ident"} { killutimer [lindex $j 2] } 
   } 

global dvb_badvhost 
set temp 0 
foreach i [string tolower $dvb_badvhost] { 
if {[string match $i [string tolower $tls_vhost]]} { 
set temp 1 
  putserv "PRIVMSG $chan  : Your vhost is not changed 3$tls_vhost3" 
  putserv "PRIVMSG $chan : Its not a valid vhost 3$tls_vhost3" 
  return 0 
} 
} 


  putserv "PRIVMSG hostserv : set $tls_nick $tls_vhost" 
  putserv "PRIVMSG hostserv : set $tls_nick $tls_vhost" 
  putserv "NOTICE $tls_nick : Your vhost is changed in 3$tls_vhost3" 
  putserv "NOTICE $tls_nick : Type /msg hostserv on " 

  } 
  return 0 
} 

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


 putlog "vhost was successfully loaded."
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

The problem is in these 2 lines in proc tls:ident:

Code: Select all

putserv "PRIVMSG $chan  : Your vhost is not changed 3$tls_vhost3"
putserv "PRIVMSG $chan : Its not a valid vhost 3$tls_vhost3"
by $chan, you probably meant #vhost.
d
doc
Voice
Posts: 2
Joined: Sun Jul 29, 2007 12:42 pm

Post by doc »

Thankyou Sir_Fz your help was much appreciated
User avatar
aslpls
Halfop
Posts: 52
Joined: Mon May 02, 2016 9:41 am

Re: VHOST

Post by aslpls »

tested the script and working 100% .. user can request vhost quickly and obtained it..

however..



new registered user request a vhost

!vhost my.only.vhost.requested

once the user disconnected from the network and login again, and identify with registered user.
The user need to request it again, and it is the same thing if you request another vhost and then disconnected from the network the next time you login the old vhost will show.


** if anyone can add from the script to auto identify from the hostserv so that the newly requested vhost will be used.


***Note:

[18:44] -HostServ- Number Nick Vhost Created
[18:44] -HostServ- Displayed 0 records (0 total).


once the user request a vhost, it is not added or displayed in the hostserv..


thank you.
s
simo
Revered One
Posts: 1107
Joined: Sun Mar 22, 2015 2:41 pm

Re: VHOST

Post by simo »

asL_pLs wrote:tested the script and working 100% .. user can request vhost quickly and obtained it..

however..



new registered user request a vhost

!vhost my.only.vhost.requested

once the user disconnected from the network and login again, and identify with registered user.
The user need to request it again, and it is the same thing if you request another vhost and then disconnected from the network the next time you login the old vhost will show.


** if anyone can add from the script to auto identify from the hostserv so that the newly requested vhost will be used.


***Note:

[18:44] -HostServ- Number Nick Vhost Created
[18:44] -HostServ- Displayed 0 records (0 total).


once the user request a vhost, it is not added or displayed in the hostserv..


thank you.
On wich irc network do u use this and wich services package is used there ?
User avatar
aslpls
Halfop
Posts: 52
Joined: Mon May 02, 2016 9:41 am

Post by aslpls »

using UNREALIRCD + ANOPE (irc.underx.org)
s
simo
Revered One
Posts: 1107
Joined: Sun Mar 22, 2015 2:41 pm

Post by simo »

i assume u use the latest release of anope

u can change this line in hostserv.conf

https://github.com/anope/anope/blob/2.0 ... e.conf#L71


change to :

activate_on_set = true
and rehash anope on irc as services root with command
/os reload
User avatar
aslpls
Halfop
Posts: 52
Joined: Mon May 02, 2016 9:41 am

Post by aslpls »

Ok, i'll try and give you the feedback soon..
s
simo
Revered One
Posts: 1107
Joined: Sun Mar 22, 2015 2:41 pm

Post by simo »

Code: Select all


 
array set colors {
white \00300
black \00301
blue \00302
green \00303
red \00304
brown \00305
purple \00306
orange \00307
yellow \00308
lightgreen \00309
darkgreen \00310
cyan \00311
lightblue \00312
pink \00313
grey \00314
lightgrey \00315
end \017
nocolor \003
bold \002
underline \037
}
foreach {color code} [array get colors] { proc $color {} "return $code" } 
 





#set this to channel
set scan(chan) "#vhost"
# Set this to the bot's O-Line username #
set oper(username) "*******"
# Set this to the bots O-Line password #
set oper(password) "*****"
# Set here the words that are not alowed in the vhost #
set dvb_badvhost {
   "*admin*"
   "*bitch*"
   "*operator*"
   "*ircop*"   
   "*FutureForce*"
   "*Future*"
   "*C0mPl3x*"
   "*ComPlex*"
   "*Marro*"
   "*Maro*"
   "*netadmin*"
   "*N3TADM1N*"
}



## 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 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
  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 $tls_nick : Don't Use This Command Outside $::scan(chan)"
      return 0
   }
 if {$vhost == ""} {
 if {$chan == "$::scan(chan)"} {
   putserv "PRIVMSG $chan : With the command [red]!VHOST [end]  you can make a vhost."
   putserv "PRIVMSG $chan : Do it this way, !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 /msg nickserv HELP"
   return 0
   }
      putserv "NOTICE $tls_nick : Met het commando [red] !VHOST [end] kan u een vhost instellen.[end]"
      putserv "NOTICE $tls_nick : Dit commando kunt u echter alleen gebruiken in $::scan(chan)"
      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 !vhost <vhost>"
   }
  if {$tls_ident == "2" && $regist == "is a registered nick"} {
    foreach j [utimers] {
        if {[lindex $j 1] == "tls:not:ident"} { killutimer [lindex $j 2] }
   }

global dvb_badvhost
set temp 0
foreach i [string tolower $dvb_badvhost] {
if {[string match $i [string tolower $tls_vhost]]} {
set temp 1
  putserv "PRIVMSG $::scan(chan)  : Your vhost is not changed [green] $tls_vhost [end]"
  putserv "PRIVMSG $::scan(chan) : Its not a valid vhost [green] $tls_vhost [end]"
  return 0
}
}


  putserv "PRIVMSG hostserv :set $tls_nick $tls_vhost"
  putserv "NOTICE $tls_nick :Your vhost is changed to\: [green] $tls_vhost [end]"

  }
  return 0
}

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


 putlog "vhost was successfully loaded."

User avatar
aslpls
Halfop
Posts: 52
Joined: Mon May 02, 2016 9:41 am

Post by aslpls »

thanks simo..


for other users this too working fine.

http://forum.egghelp.org/viewtopic.php? ... ight=vhost
Post Reply