mIRC Home    About    Download    Register    News    Help

Print Thread
#133699 23/10/05 11:06 PM
Joined: Oct 2005
Posts: 98
S
Babel fish
OP Offline
Babel fish
S
Joined: Oct 2005
Posts: 98
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.

#133700 24/10/05 12:34 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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),+)
}
}
  

#133701 24/10/05 12:57 AM
Joined: Oct 2005
Posts: 98
S
Babel fish
OP Offline
Babel fish
S
Joined: Oct 2005
Posts: 98
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?

Last edited by starpossen; 24/10/05 01:10 AM.
#133702 24/10/05 05:08 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
change /uss $chan $2- to /uss $nick $2-

#133703 24/10/05 09:32 PM
Joined: Oct 2005
Posts: 98
S
Babel fish
OP Offline
Babel fish
S
Joined: Oct 2005
Posts: 98
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.

Last edited by starpossen; 24/10/05 09:38 PM.
#133704 25/10/05 01:33 AM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
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?

#133705 25/10/05 02:11 AM
Joined: Oct 2005
Posts: 98
S
Babel fish
OP Offline
Babel fish
S
Joined: Oct 2005
Posts: 98
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.

#133706 25/10/05 03:38 AM
Joined: Feb 2005
Posts: 342
R
Fjord artisan
Offline
Fjord artisan
R
Joined: Feb 2005
Posts: 342
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.

Last edited by Rand; 25/10/05 03:43 AM.
#133707 25/10/05 03:52 AM
Joined: Oct 2005
Posts: 98
S
Babel fish
OP Offline
Babel fish
S
Joined: Oct 2005
Posts: 98
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.

Last edited by starpossen; 25/10/05 04:07 AM.
#133708 25/10/05 05:49 PM
Joined: Oct 2005
Posts: 98
S
Babel fish
OP Offline
Babel fish
S
Joined: Oct 2005
Posts: 98
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?

#133709 25/10/05 06:00 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
You can't send an echo to someone. Do you mean "notice"?


Invision Support
#Invision on irc.irchighway.net
#133710 25/10/05 06:36 PM
Joined: Oct 2005
Posts: 98
S
Babel fish
OP Offline
Babel fish
S
Joined: Oct 2005
Posts: 98
Well I changed the msg to noctice, and that works aswell, but the echo would have been nice, but i'll stick with notice


Link Copied to Clipboard