mIRC Homepage
Posted By: starpossen Usersearch - 23/10/05 11:06 PM
Hi.
Im new here and also in scripting, however, I got this alias
Code:
/uss /echo http://www.mysite.net/users.php?search= $+ $replace($1-,$chr(32),+) 

Wich works great, but what I would like is, that if an OP (only OPs should be able to use this) types !uss name, it will then show the same thing, it's for use to a bot, im sure this is very simple, but if one of you could tell me what I should do, I would be very glad.
I hope I explained this okay.
Posted By: RusselB Re: Usersearch - 24/10/05 12:34 AM
Code:
 on *:text:!uss*:#:{
if ($nick isop $chan) && ($2-) { /uss $chan $2- }
}
alias uss {
if ($1 ischan) {
msg $1 http://www.mysite.net/users.php?search= $+ $replace($2-,$chr(32),+) 
}
else {
echo http://www.mysite.net/users.php?search= $+ $replace($1-,$chr(32),+)
}
}
  
Posted By: starpossen Re: Usersearch - 24/10/05 12:57 AM
Thank you so much, it works perfectly, I actually tried something like it, but I now see I still need to learn alot, thanks again.
Okay did some more testing, is it possible to make it that it only shows to the one typing the command?
Posted By: RusselB Re: Usersearch - 24/10/05 05:08 AM
change /uss $chan $2- to /uss $nick $2-
Posted By: starpossen Re: Usersearch - 24/10/05 09:32 PM
I did what you said, but it still shows in the channel for everyone to see, hower the part where OPs only can use it works.
Posted By: MikeChat Re: Usersearch - 25/10/05 01:33 AM
this part
echo http://www.mysite.net/users.php?search= $+ $replace($1-,$chr(32),+)
shows , but only you can see it, is that the part you are talking about?
Posted By: starpossen Re: Usersearch - 25/10/05 02:11 AM
When I type !uss someuser it shows this: http://www.mysite.net/users.php?search=someuser (and thats the correct output) and that's fine but the thing is, that everyone can see the link, and I want it to only be visible to the one typing the command.
Posted By: Rand Re: Usersearch - 25/10/05 03:38 AM
This script needs a few small changes, if you wish to have it message a nick. First off, the current "alias uss" only checks to see if $1 is a channel, obviously if you try to /uss $nick, it will fail the check and will echo to the bots screen instead.

So, what you should probably do is:

Code:
on *:text:!uss *:#:{
  if ($nick isop $chan && $2-) { /uss $nick $2- }
}

alias uss {
  if ($1 && $2-) { 
    msg $1 http://www.mysite.net/users.php?search= $+ $replace($2-,$chr(32),+)
  }
  [color:red]; I'll remove the else { } echo line. since it probably isn't needed.[/color]
}


Hope that helps.
Posted By: starpossen Re: Usersearch - 25/10/05 03:52 AM
That did it, works perfectly now, thank you very much.
Forgot, what if I would use . instead of ! what do i change? I tried itchanging the ! to . but then it gives the link twice.
My bad, It works, I guess im getting tired, 6am here now, anyways, thanks again for your help.
Posted By: starpossen Re: Usersearch - 25/10/05 05:49 PM
Okay it works absolutly great, but I was wondering, is it possible to make it echo the one typing the command instead of using msg?
Posted By: Riamus2 Re: Usersearch - 25/10/05 06:00 PM
You can't send an echo to someone. Do you mean "notice"?
Posted By: starpossen Re: Usersearch - 25/10/05 06:36 PM
Well I changed the msg to noctice, and that works aswell, but the echo would have been nice, but i'll stick with notice
© mIRC Discussion Forums