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 

Adduser as !*@Hostmask [SOLVED]

 
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 22, 2009 9:28 pm    Post subject: Adduser as !*@Hostmask [SOLVED] Reply with quote

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:

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
Back to top
View user's profile Send private message
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Wed Apr 22, 2009 9:45 pm    Post subject: Reply with quote

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

to this: set addusermask !*@[lindex [split [getchanhost $text $chan] @] 1]

_________________
speechles' eggdrop tcl archive
Back to top
View user's profile Send private message
cache
Master


Joined: 10 Jan 2006
Posts: 306
Location: Mass

PostPosted: Wed Apr 22, 2009 10:12 pm    Post subject: Reply with quote

thanks speechless Very Happy
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