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.

auth and deauth

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
User avatar
ultralord
Master
Posts: 255
Joined: Mon Nov 06, 2006 6:52 pm

auth and deauth

Post by ultralord »

i use one script pwf.tcl and if someone user have G flag the script recognized the user like admin..

Script for auth..

Code: Select all

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
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

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
User avatar
ultralord
Master
Posts: 255
Joined: Mon Nov 06, 2006 6:52 pm

Post by ultralord »

in the code can't make !deauth .. i want to add it in code.. how i can !death when i am authed
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

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
User avatar
ultralord
Master
Posts: 255
Joined: Mon Nov 06, 2006 6:52 pm

Post by ultralord »

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..
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Maybe this is what you need (has to be loaded before any script that uses its function): Auth
Allows you to quickly and easily add authentication to channel commands.
You could easily adapt your script to use it.

Code: Select all

if {(![authed $handle])} {return}
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
ultralord
Master
Posts: 255
Joined: Mon Nov 06, 2006 6:52 pm

Post by ultralord »

thnx.. i modified this and works fine

ty
Post Reply