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.

Adduser as !*@Hostmask [SOLVED]

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
c
cache
Master
Posts: 306
Joined: Tue Jan 10, 2006 4:59 am
Location: Mass

Adduser as !*@Hostmask [SOLVED]

Post by cache »

My current adduser script is adding chatters like this:

*!Nick@Hostmask

and I want it to add like this..

!*@Hostmask

So can anyone please change it? I been trying for the past 2 hrs and can't get it to work.

Code I have is:

Code: Select all

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 *![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 bot."
   save
   unset addusermask
   unset addusernick
  }
}
Last edited by cache on Wed Apr 22, 2009 10:13 pm, edited 1 time in total.
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

Code: Select all

change : set addusermask *![getchanhost $text $chan] 

to this: set addusermask !*@[lindex [split [getchanhost $text $chan] @] 1] 
c
cache
Master
Posts: 306
Joined: Tue Jan 10, 2006 4:59 am
Location: Mass

Post by cache »

thanks speechless :D
Post Reply