| View previous topic :: View next topic |
| Author |
Message |
cache Master
Joined: 10 Jan 2006 Posts: 306 Location: Mass
|
Posted: Wed Apr 19, 2006 1:39 pm Post subject: help with adduser script |
|
|
| 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 |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Wed Apr 19, 2006 6:02 pm Post subject: |
|
|
Change
| Code: | | [maskhost $text![getchanhost $text $chan]] |
to
| Code: | | *![getchanhost $text $chan] |
_________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
cache Master
Joined: 10 Jan 2006 Posts: 306 Location: Mass
|
Posted: Wed Apr 19, 2006 7:13 pm Post subject: |
|
|
Thanks very much Sir  |
|
| Back to top |
|
 |
cache Master
Joined: 10 Jan 2006 Posts: 306 Location: Mass
|
Posted: Wed Apr 19, 2006 8:47 pm Post subject: |
|
|
| 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 |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Wed Apr 19, 2006 8:49 pm Post subject: |
|
|
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 |
|
 |
cache Master
Joined: 10 Jan 2006 Posts: 306 Location: Mass
|
Posted: Wed Apr 19, 2006 8:55 pm Post subject: |
|
|
So there is no other option?  |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Thu Apr 20, 2006 3:56 am Post subject: |
|
|
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 |
|
 |
cache Master
Joined: 10 Jan 2006 Posts: 306 Location: Mass
|
Posted: Thu Apr 20, 2006 5:11 am Post subject: |
|
|
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 |
|
 |
|