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 

help with adduser script

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


Joined: 10 Jan 2006
Posts: 306
Location: Mass

PostPosted: Wed Apr 19, 2006 1:39 pm    Post subject: help with adduser script Reply with quote

Code:
# Process AddUser

proc proc_adduser { nick uhost hand chan text } {
  set addusernick [nick2hand $text]
  if {[validuser $addusernick]} {
   putserv "PRIVMSG $chan :\002$text\002 Is Already In User Database As \002$addusernick\002"
  } else  {
   unset addusernick
   set addusermask [maskhost $text![getchanhost $text $chan]]
   adduser $text $addusermask
   set addusernick [nick2hand $text]
   putlog "\002$nick\002 Added \002$addusernick\($text\)\002 To User Database"
   putserv "PRIVMSG $chan :$text Has Been Added To The Database."
}


When I use it.. it adds them to the userfile like this:
Code:
cache      - a                       
--HOSTS *!*@cache !
--XTRA created 1145459622

I want it to add like this:
Code:
cache   - a                       
--HOSTS *!cache@cache
--LASTON 1143185765 #Trivia
--XTRA created 1125183441


So I need it to add as usernick@hostmask

Can anyone help me?

thanks


Last edited by cache on Wed Apr 19, 2006 7:14 pm; edited 1 time in total
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Wed Apr 19, 2006 6:02 pm    Post subject: Reply with quote

Change
Code:
[maskhost $text![getchanhost $text $chan]]

to
Code:
*![getchanhost $text $chan]

_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
cache
Master


Joined: 10 Jan 2006
Posts: 306
Location: Mass

PostPosted: Wed Apr 19, 2006 7:13 pm    Post subject: Reply with quote

Thanks very much Sir Smile
Back to top
View user's profile Send private message
cache
Master


Joined: 10 Jan 2006
Posts: 306
Location: Mass

PostPosted: Wed Apr 19, 2006 8:47 pm    Post subject: Reply with quote

Code:
# Process DelUser

proc proc_deluser { nick uhost hand chan text } {
  set delusernick [nick2hand $text]
  if {[validuser $delusernick]} {
    deluser $delusernick


Trying to figure out why I can't delete a user unless their on the channel?

thanks
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Wed Apr 19, 2006 8:49 pm    Post subject: Reply with quote

Because if nick is not on any channel the bot's on, then [nick2hand] will be useless (will not return nick's handle).
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
cache
Master


Joined: 10 Jan 2006
Posts: 306
Location: Mass

PostPosted: Wed Apr 19, 2006 8:55 pm    Post subject: Reply with quote

So there is no other option? Twisted Evil
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 Apr 20, 2006 3:56 am    Post subject: Reply with quote

Match a known handle and/or address to delete a user possibly but this idea is flawed if you have no idea what handle they were added under or address used.
_________________
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
cache
Master


Joined: 10 Jan 2006
Posts: 306
Location: Mass

PostPosted: Thu Apr 20, 2006 5:11 am    Post subject: Reply with quote

Hey Alchera,

The hostmasks are the same as the nicknames Nick@Nick

When I add them it shows them added like this in user file:

cache - a
--HOSTS *!cache@*

Even tho im not sure why it don't add like this:

cache - a
--HOSTS *!cache@cache*

I'm not worried if theres any flaws b/c the flags it sets will not make them gain any ops.

thanks
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