| View previous topic :: View next topic |
| Author |
Message |
ultralord Master

Joined: 06 Nov 2006 Posts: 255
|
Posted: Wed Dec 26, 2007 7:56 pm Post subject: auth and deauth |
|
|
i use one script pwf.tcl and if someone user have G flag the script recognized the user like admin..
Script for auth..
| Code: |
bind msg - [string trim $g_trigger]admin g_auth
proc g_auth {nick uhost hand rest} {
global g_authnick g_pickupchan
set nick [g_charfilter $nick]
set handle hand
set pw [lindex $rest 0]
set givenick [lindex $rest 1]
if [string length $givenick] {
set hand $givenick
} else {
if ![string compare $hand "*"] {
putserv "NOTICE $nick :[g_txt auth1]"
return 0
}
}
if [lsearch -exact [userlist G|G] $hand]==-1 {
putserv "NOTICE $nick :[g_txt auth2] $hand"
return 0
}
set ok 0
if [onchan $nick $g_pickupchan] {
set ok 1
}
if !$ok {
putserv "NOTICE $nick :[g_txt auth3] $g_pickupchan [g_txt auth4]"
return 0
}
if [info exists g_authnick($nick)] {
putserv "NOTICE $nick :[g_txt auth5] $g_authnick($nick)."
return 0
}
if ![string length $pw] {
putserv "NOTICE $nick :[g_txt auth6]"
return 0
}
if [passwdok $hand ""] {
putserv "NOTICE $nick :[g_txt auth7]"
return 0
}
if [passwdok $hand $pw] {
chattr $hand +H
set g_authnick($nick) $hand
putserv "NOTICE $nick :[g_txt auth8]"
putcmdlog "($nick!$uhost) !$hand! admin ..."
} else {
putserv "NOTICE $nick :[g_txt auth9]"
putcmdlog "($nick!$uhost) !$hand! FAILED admin"
}
} |
how i can deauth my nick with command like !admin pass (this is for auth)
thanks |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Wed Dec 26, 2007 8:29 pm Post subject: |
|
|
I'm guessing this is the kalhimeo coded script.
I suggest you get a new copy and read the very clear instructions @ Koders Code Search _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
ultralord Master

Joined: 06 Nov 2006 Posts: 255
|
Posted: Thu Dec 27, 2007 7:35 am Post subject: |
|
|
| in the code can't make !deauth .. i want to add it in code.. how i can !death when i am authed |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Thu Dec 27, 2007 5:59 pm Post subject: |
|
|
| ultralord wrote: | | in the code can't make !deauth .. i want to add it in code.. how i can !death when i am authed |
What is the purpose of !addadmin !remadmin !enable !disable? _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
ultralord Master

Joined: 06 Nov 2006 Posts: 255
|
Posted: Thu Dec 27, 2007 7:18 pm Post subject: |
|
|
| no.. when someone press !admin password then the bot recognized my like admin.. i want to insert new command for logout if someone want it.. |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Fri Dec 28, 2007 10:16 pm Post subject: |
|
|
Maybe this is what you need (has to be loaded before any script that uses its function): Auth
| Quote: | | Allows you to quickly and easily add authentication to channel commands. |
You could easily adapt your script to use it.
| Code: | | if {(![authed $handle])} {return} |
_________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
ultralord Master

Joined: 06 Nov 2006 Posts: 255
|
Posted: Sat Dec 29, 2007 2:42 pm Post subject: |
|
|
thnx.. i modified this and works fine
ty |
|
| Back to top |
|
 |
|