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 

On JOin Link

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


Joined: 06 Feb 2009
Posts: 24

PostPosted: Fri Feb 06, 2009 8:38 pm    Post subject: On JOin Link Reply with quote

Hello all i was wondering if somebody could assist me i have just started learning TCL scripts and find it really confusing lol anyway to my request i used to do mirc scripts and have a script that when i used joined #help it would display a link to there profile in another room along with a few other information for example

<UserBot> User has joined #help as <Felix2003> <Felix2003@Felix.The.Crazy.Cat>
<UserBot> User Details For Felix2003 ----> http://www.sitename.com/users.php?search=Felix2003

now i can get the 2nd part the link to the site to work but the 1st seems abit harder

now the 2nd part Smile

we also have a java client that users can use but it puts a annoying _ at the end of there name when the link shows in the other room id like the _ to be removed from the link so for example


<UserBot> User has joined #help as <Felix2003> <Felix2003@Felix.The.Crazy.Cat>
<UserBot> User Details For Felix2003_ ----> http://www.sitename.com/users.php?search=Felix2003_

would show with the _ removed

<UserBot> User has joined #help as <Felix2003> <Felix2003@Felix.The.Crazy.Cat>
<UserBot> User Details For Felix2003_ ----> http://www.sitename.com/users.php?search=Felix2003

also i would like but not important a exception list so the staff when they enter or ping and rejoin doesn't activate it

i hope somebody could help Smile


thank you for your time
Back to top
View user's profile Send private message
cache
Master


Joined: 10 Jan 2006
Posts: 306
Location: Mass

PostPosted: Sat Feb 07, 2009 4:35 am    Post subject: Reply with quote

I think that _ can be stopped if you use $uhost instead of $nick
Back to top
View user's profile Send private message
Felix2003
Voice


Joined: 06 Feb 2009
Posts: 24

PostPosted: Sat Feb 07, 2009 5:57 am    Post subject: Reply with quote

ok you just solved the 1st part thank you xD but it doesn't remove the _
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: Sat Feb 07, 2009 10:27 am    Post subject: Reply with quote

Everything in this thread is covered in many others as well, searching before posting questions can give you answers much faster than waiting for a reply... Wink
Code:
putserv "privmsg $relaychan :User Details For $nick ----> http://www.sitename.com/users.php?search=[string map {"_" ""} $nick]"

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


Joined: 06 Feb 2009
Posts: 24

PostPosted: Sat Feb 07, 2009 10:47 am    Post subject: Reply with quote

ty speechless i did search but couldnt find anything i bet i passed it lol Smile
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Sat Feb 07, 2009 3:16 pm    Post subject: Reply with quote

The disadvantage of string map is that it will remove any _ within the nick, not only trailing ones (messing up nicknames such as my own, NML_375).
I would rather recommend using the string trimright command;
Code:
puthelp "PRIVMSG $relaychan :User Details For $nick ----> http://www.sitename.com/users.php?search=[string trimright $nick "_"]"

_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
Felix2003
Voice


Joined: 06 Feb 2009
Posts: 24

PostPosted: Sat Feb 07, 2009 7:01 pm    Post subject: Reply with quote

nml375 your worked perfectly i wasnt thinking of if the had the _ in there name other then at the end thank you

also was wonderingif anybody managed to find away for a exceptions list?
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Sat Feb 07, 2009 7:06 pm    Post subject: Reply with quote

For that, I would recommend some kind of timestamping mechanism.
Something like this should do the trick (based on code posted by user):
Code:
proc throttle {id time} {
 if {[info exists ::throttle($id)] && $::throttle($id) > [clock seconds]} {
  return 0
 }
 set ::throttle($id) [expr [clock seconds] + $time]
 return 1
}

proc myproc {} {
 if {[throttle "theid" 300]} {
  #we're ok, do the good stuff here
 } {
  #still throttle'd, do nothing
  return 0
 }
}


Edit: A good idea for id would be nickname of the joiner, nick:chan, or something like that.
_________________
NML_375, idling at #eggdrop@IrcNET
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