|
Joined: Jul 2003
Posts: 1
Mostly harmless
|
OP
Mostly harmless
Joined: Jul 2003
Posts: 1 |
i want to write /opme and then i check if a specify nick is online and if the host match with the host i have set, then send a command to the nick
|
|
|
|
Joined: May 2003
Posts: 2,265
Hoopy frood
|
Hoopy frood
Joined: May 2003
Posts: 2,265 |
[/color]
[color:green]alias opme {[/color]
[color:red]mode # +o $me[/color]
[color:purple]who $1[/color]
[color:pink]}[/color]
[color:brown]raw[/color][color:blue]3[/color][color:green]5[/color][color:red]2[/color][color:#666666]:*:{[/color]
[color:green]if (G. isin $1-) { echo -at $6 is offline }[/color]
[color:blue]else { commands }[/color]
[color:brown]}[/color]
[color:pink] [/color]
[color:pink]$6 = the nickname you who'd[/color]
[color:yellow]e.g: /opme blah[/color]
[color:purple]$6 = blah in raw 352[/color]
[color:purple]
new username: tidy_trax
|
|
|
|
Joined: Dec 2002
Posts: 2,809
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,809 |
That code doesn't make sense. The only way you can do /mode # +o $me is if you are already an op, and if you are already an op, then there is no sense in setting +o on yourself. The only way to make a /opme command is if the network has a chanserv (or if the channel has a bot) and you can use that to op yourself. Additionally, I have no idea why you are checking if "G." is in the WHO reply, the flag is "G" means they are away, not "G." And as usual, I'm sure you know of some server out there that does this so I'll just quote from RFC1459: 352 RPL_WHOREPLY "<channel> <user> <host> <server> <nick> <H|G>[*][@|+] :<hopcount> <real name>"
Note how the flags are "H" or "G" not "H" or "G.". Furthermore, your code makes even less sense by assuming /away and not being online are the same thing, which is pure stupidity. If you want to tell if someone is online, you have to either use mIRC's built in /notify system, or use a /ison, not a /who. Oh and lets not forget you check if "G." is in $1-, which means if my realname is set to "greg." by your script, that is the same thing as be not being online.
Why don't you try actually testing your code before you post something that in reality, does NOTHING like what the poster requested.
|
|
|
|
Joined: May 2003
Posts: 2,265
Hoopy frood
|
Hoopy frood
Joined: May 2003
Posts: 2,265 |
i cant test my code because i deleted mirc, but thats what i used to use...... also instead of making a stupidly long(sad)post like that you could of just said: that doesnt work.
new username: tidy_trax
|
|
|
|
Joined: Dec 2002
Posts: 2,809
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,809 |
Why was it sad? What is sad is that you give out false information giving the impression you know what you're talking about when you have no clue. Why is it sad, that I, trying to be helpful, pointed out your errors so you wouldn't make them again? When you write a paper do you prefer when the instructor says "bad paper" or when you are told WHY it was a bad paper. I prefer the latter since I can then (crazy idea) make sure I don't make the same mistakes again. But I guess not everyone wants to learn from their mistakes, you clearly are content with your lack of information, and thats fine, however, it doesn't mean you have to give false information to users. If you uninstalled mIRC and therefore can't test the code, then try this... DON'T OFFER YOUR HELP. I've yet to see you make one piece of code that actually did what it was supposed to. So if you couldn't do it when you had mIRC and could test things, how the hell do you expect to do it when you are blindly writing code that you have no idea how to write?
|
|
|
|
Joined: May 2003
Posts: 2,265
Hoopy frood
|
Hoopy frood
Joined: May 2003
Posts: 2,265 |
another one of your stupid comparisons...... as i said,you could of said: your code doesnt work coz of <this,this and this> not: your an idiot for thinking theyre the same thing. ....... ....
new username: tidy_trax
|
|
|
|
Joined: Dec 2002
Posts: 2,809
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,809 |
If I said, "You're an idiot for thinking they're the same thing" then I appologize for that, that isn't what I meant to say at all. What I meant to say was, "You're an idiot."
|
|
|
|
Joined: May 2003
Posts: 2,265
Hoopy frood
|
Hoopy frood
Joined: May 2003
Posts: 2,265 |
thanks and your an ignorant fool but i can write what i think of you in 1 line, not a stupid essay.
new username: tidy_trax
|
|
|
|
Joined: Dec 2002
Posts: 3,138
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,138 |
alias opme {
set %opme [color:green]nickname[/color]
ison %opme
}
raw 303:*:{
if ( %opme ) && ( $2 == $null ) || ( $2 == %opme ) {
if ( $2 == %opme ) {
msg %opme [color:green]command[/color]
}
else {
echo -a %opme isn't online.
}
unset %opme
haltdef
}
} ^Should work
|
|
|
|
Joined: Dec 2002
Posts: 2,809
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,809 |
An ignorant fool? That means a lot coming from someone who has proven himself to know NOTHING.
|
|
|
|
Joined: May 2003
Posts: 2,265
Hoopy frood
|
Hoopy frood
Joined: May 2003
Posts: 2,265 |
if i knew nothing,you wouldn't be seeing this message .
new username: tidy_trax
|
|
|
|
Joined: Dec 2002
Posts: 2,985
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,985 |
Settle petals. Why don't you go down to the Police Boys Club and have a boxing/wrestling match. Codemastr is right about one thing though, you do post alot of untested code here that doesn't work. And when you are advised of this you repeat the offence over and over.
|
|
|
|
Joined: May 2003
Posts: 2,265
Hoopy frood
|
Hoopy frood
Joined: May 2003
Posts: 2,265 |
as i said,i cant test it.
new username: tidy_trax
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 3,012 |
if you cant test it, either dont post it or post "untested". To use wasting your and other's time for somthing that is useless and doesnt answer a user's question.
-KingTomato
|
|
|
|
Joined: Dec 2002
Posts: 2,985
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,985 |
Why are you on a mIRC forum if you don't use mIRC for?
|
|
|
|
Joined: Dec 2002
Posts: 2,809
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,809 |
Because if he left he couldn't call me a "ignorant fool" anymore.
|
|
|
|
Joined: May 2003
Posts: 2,265
Hoopy frood
|
Hoopy frood
Joined: May 2003
Posts: 2,265 |
because there are still certain people i can help and i don't see why i shouldnt try and help even though i quit.
new username: tidy_trax
|
|
|
|
Joined: May 2003
Posts: 2,265
Hoopy frood
|
Hoopy frood
Joined: May 2003
Posts: 2,265 |
i could still call you it on mircscripts
new username: tidy_trax
|
|
|
|
Joined: Dec 2002
Posts: 2,985
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,985 |
When I think someone is wrong I don't resort to namecalling, all that does is make people think you or your reply is not genuine. Maybe Mircscripts.org is the place for namecalling - this place certainly isn't.
I still don't think it is a worthwhile contribution to place code here that doesn't work. There is no reason why you cannot have a copy of mIRC on your machine to test code before posting if you want to contribute here. I test all but the very simplest code when I post such material. That way I don't have to write another 15 posts verify correctness every time.
I also think your signature is juvenile.
|
|
|
|
Joined: May 2003
Posts: 2,265
Hoopy frood
|
Hoopy frood
Joined: May 2003
Posts: 2,265 |
cant be arsed to argue with ya :tongue:
new username: tidy_trax
|
|
|
|
|