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 

tcl of access temporary control by means of host storm

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


Joined: 14 Dec 2011
Posts: 16
Location: Bolivia, Beni, Trinidad / DALnet

PostPosted: Thu Dec 15, 2011 9:00 am    Post subject: tcl of access temporary control by means of host storm Reply with quote

good to all I am new in the web, I would like that they help me in this tcl
like creating a bridge in which the eggdrop by means of the command / msg bot auth <pass>
that is to say that when I should identify so / msg bot auth <pass> in bot answers me
recognized password and at the same time I joined in temporary form like proprietor
as for example:. +host Sedition! * *

he believes and add a host in the file.user for example:. +host Sedition! * *

nota. - the aggregate user is not a real proprietor the idea is that only he adds it in temporary form
that the method of adding host is only temporary, that is to say that only lasts 24 hours
and later the same eggdrop removes it that is to say the aggregate host removes example
+host Sedition! * *
save
utimer 216000-host Sedition! * *
Code:

# To authenticate: /msg bot auth <pass>

#### tcl based on the Opposing code

############# code tcl ###############

bind msg auth fz:mauth

## Set Commands script logo:
set fzcom(logo) "\[\002Shrider\002\]"


proc fz:mauth {nick uhost hand arg} {
global botnick fzcom host save
+host mdrt!*@*
save
utimer 216000 -host Sedition!*@*
return 0
}
if {[set pw [lindex [split $arg] 0]] == ""} {
puthelp "NOTICE $nick :$fzcom(logo): SYNTAX: /msg $botnick auth <password>"
return 0
}
if {[passwdok $hand ""]} {
puthelp "NOTICE $nick :$fzcom(logo): You haven't set your password. Type: \[/msg $botnick pass <password>\] to set-up Your password."
return 0
}
if {[matchattr $hand Q]} {
puthelp "NOTICE $nick :$fzcom(logo): You have authenticate before, no need another authentication."
return 0
}
if {![passwdok $hand $pw]} {
puthelp "NOTICE $nick :$fzcom(logo): Authentication \002rejected\002!!, check out Your password."
return 0
}
chattr $hand +Q
puthelp "NOTICE $nick :$fzcom(logo): Authentication \002accepted\002!!, thank you for Your authentication."
putcmdlog "$fzcom(logo): <<$nick>> !$hand! Authentication."
return 0
}


bind msg pass fz:mpass

proc fz:mpass {nick uhost hand arg} {
global botnick fzcom
if {[set pw [lindex [split $arg] 0]] == ""} {
puthelp "NOTICE $nick :$fzcom(logo): SYNTAX: /msg $botnick pass <password>"
return 0
}
if {![passwdok $hand ""]} {
puthelp "NOTICE $nick :$fzcom(logo): Your password has been set before, you don't need to set it again. Simply type: \[/msg $botnick auth <password>\] to authenticate yourself."
return 0
}
setuser $hand PASS $pw
puthelp "NOTICE $nick :$fzcom(logo): Your password is now set to: \002$pw\002, remember your password for future use."
putcmdlog "$fzcom(logo): <<$nick>> !$hand! Set Password."
return 0
}

proc cmdbtype [list name [list type 3]] {
if {[scan $name {%[^!]!%[^@]@%s} nick user host]!=3} {
error "Usage: cmdbtype <nick!user@host> \[type\]"
}
if [string match {[3489]} $type] {
if [string match {*[0-9]} $host] {
set host [join [lrange [split $host .] 0 2] .].*
} elseif {[string match *.*.* $host]} {
set host *.[join [lrange [split $host .] end-1 end] .]
}
}
if [string match {[1368]} $type] {
set user *[string trimleft $user ~]
} elseif {[string match {[2479]} $type]} {
set user *
}
if [string match {[01234]} $type] {
set nick *
}
set name $nick!$user@$host
}

proc wordwrap {str {len 100} {splitChr { }}} {
set out [set cur {}]; set i 0
foreach word [split [set str][unset str] $splitChr] {
if {[incr i [string len $word]]>$len} {
lappend out [join $cur $splitChr]
set cur [list $word]
set i [string len $word]
} {
lappend cur $word
}
incr i
}
lappend out [join $cur $splitChr]
}

good I wait for all that he learns more on tcl thanks for shaping a solid group of help
_________________
good I wait for all that he learns more on tcl thanks for shaping a solid group of help
Back to top
View user's profile Send private message Send e-mail 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