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 

auth and deauth

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
ultralord
Master


Joined: 06 Nov 2006
Posts: 255

PostPosted: Wed Dec 26, 2007 7:56 pm    Post subject: auth and deauth Reply with quote

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
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Wed Dec 26, 2007 8:29 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
ultralord
Master


Joined: 06 Nov 2006
Posts: 255

PostPosted: Thu Dec 27, 2007 7:35 am    Post subject: Reply with quote

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
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Thu Dec 27, 2007 5:59 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
ultralord
Master


Joined: 06 Nov 2006
Posts: 255

PostPosted: Thu Dec 27, 2007 7:18 pm    Post subject: Reply with quote

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
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Fri Dec 28, 2007 10:16 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
ultralord
Master


Joined: 06 Nov 2006
Posts: 255

PostPosted: Sat Dec 29, 2007 2:42 pm    Post subject: Reply with quote

thnx.. i modified this and works fine

ty
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests 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