Am incercat sa fak USERSET ANTIHACK.Am fakut setarea in sine si am modificat la !addhost & !delhost,ca odata ce antihack este ON sa nu mai poata fi schimbate.In yx_95_local_q am modificat la auth:
Code:
if { [passwdok $ident $pass]} {
tell $x 4 "$ident [getuser $ident XTRA SECNICK] [getuser $ident XTRA SECHOST] [getuser $ident XTRA SECTIME]"
setuser $ident HOSTS
setuser $ident HOSTS $host
if {[getuser $ident XTRA PERMIDENT] != ""} { setuser $ident HOSTS [getuser $ident XTRA PERMIDENT] }
setuser $ident XTRA SECNICK $nick
setuser $ident XTRA SECHOST [lindex $mix 0]
setuser $ident XTRA SECTIME "[ctime [unixtime]]"
chattr $ident +Q
return "as $ident succeeded" } else {
tell $x 10; return "FAILED: wrong password for $ident"}}}
in
Code:
if { [getuser $ident XTRA ANTIHACK == "on"] } {
if { [$host != [getuser $ident XTRA HOST]] || ![passwdok $ident $pass]} {
if { [getuser $ident XTRA REPORTING == "on"]} {
storenote $botnick $ident "Somebody tried to login with a wrong host.He had: nick:$nick, host:$host, time:[ctime [unixtime]].Pass that he tried to use: $pass"
} else { puthelp "PRIVMSG $nick :$nick,you don't have the correct host, and ANTIHACK for $ident it's enabled, so you can't auth!"
} else {
if { [passwdok $ident $pass]} {
tell $x 4 "$ident [getuser $ident XTRA SECNICK] [getuser $ident XTRA SECHOST] [getuser $ident XTRA SECTIME]"
setuser $ident HOSTS
setuser $ident HOSTS $host
if {[getuser $ident XTRA PERMIDENT] != ""} { setuser $ident HOSTS [getuser $ident XTRA PERMIDENT] }
setuser $ident XTRA SECNICK $nick
setuser $ident XTRA SECHOST [lindex $mix 0]
setuser $ident XTRA SECTIME "[ctime [unixtime]]"
chattr $ident +Q
return "as $ident succeeded" } else {
tell $x 10; return "FAILED: wrong password for $ident"}}
} else {
if { [$host != [getuser $ident XTRA HOST]] || ![passwdok $ident $pass]} {
if { [getuser $ident XTRA REPORTING == "on"]} {
storenote $botnick $ident "Somebody tried to login with a wrong host.He had: nick:$nick, host:$host, time:[ctime [unixtime]].Pass that he tried to use: $pass"
} else { puthelp "PRIVMSG $nick :$nick,you don't have the correct host, and ANTIHACK for $ident it's enabled, so you can't auth!"
} else {
if { [passwdok $ident $pass]} {
tell $x 4 "$ident [getuser $ident XTRA SECNICK] [getuser $ident XTRA SECHOST] [getuser $ident XTRA SECTIME]"
setuser $ident HOSTS
setuser $ident HOSTS $host
if {[getuser $ident XTRA PERMIDENT] != ""} { setuser $ident HOSTS [getuser $ident XTRA PERMIDENT] }
setuser $ident XTRA SECNICK $nick
setuser $ident XTRA SECHOST [lindex $mix 0]
setuser $ident XTRA SECTIME "[ctime [unixtime]]"
chattr $ident +Q
return "as $ident succeeded" } else {
tell $x 10; return "FAILED: wrong password for $ident"}}}
Este bine asta din auth? Sunt sigur ca ceva`i gresit