|
Joined: Oct 2005
Posts: 98
Babel fish
|
OP
Babel fish
Joined: Oct 2005
Posts: 98 |
Hi. Im new here and also in scripting, however, I got this alias /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.
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
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),+)
}
}
|
|
|
|
Joined: Oct 2005
Posts: 98
Babel fish
|
OP
Babel fish
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.
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
change /uss $chan $2- to /uss $nick $2-
|
|
|
|
Joined: Oct 2005
Posts: 98
Babel fish
|
OP
Babel fish
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.
|
|
|
|
Joined: Dec 2002
Posts: 1,245
Hoopy frood
|
Hoopy frood
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?
|
|
|
|
Joined: Oct 2005
Posts: 98
Babel fish
|
OP
Babel fish
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.
|
|
|
|
Joined: Feb 2005
Posts: 342
Fjord artisan
|
Fjord artisan
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: 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.
|
|
|
|
Joined: Oct 2005
Posts: 98
Babel fish
|
OP
Babel fish
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.
|
|
|
|
Joined: Oct 2005
Posts: 98
Babel fish
|
OP
Babel fish
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?
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
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
|
|
|
|
Joined: Oct 2005
Posts: 98
Babel fish
|
OP
Babel fish
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
|
|
|
|
|