mIRC Home    About    Download    Register    News    Help

Print Thread
#110631 09/02/05 03:18 AM
Joined: Feb 2005
Posts: 193
A
Vogon poet
OP Offline
Vogon poet
A
Joined: Feb 2005
Posts: 193
Hey all. Can anyone help me with my problem. I have this command:

Code:
 on *:join:#:{ .timer 1 5 if ( $nick == $!me ) && ( $!me isop $chan ) /prop $chan ownerkey blahblah } 


I need it to, when i join a room that i am an owner in, prompt me with a dialog that asks: Please Set the Ownerkey, and whatever i type in, will be set as the owner key. Any ideas? Thanks in advance for your help! laugh

Austin

#110632 09/02/05 03:23 AM
Joined: Mar 2004
Posts: 358
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Mar 2004
Posts: 358
There isnt an exact way to get if your the owner without doing a bit of checking, and I don't know IRCX that well but on join heres what you would do to set the owner key with a dialog:
Code:
on me:*:join:#: { .prop $chan ownerkey $?="Owner Key?" }

#110633 09/02/05 03:54 AM
Joined: Nov 2003
Posts: 2,321
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,321
$? and $input don't work in events, but here's a way around that:

Code:
alias myinputbox { return $?=" $+ $1" }
on me:*:join:#: { .timer 1 0 prop $chan ownerkey $myinputbox(Owner Key?) }

#110634 09/02/05 04:21 AM
R
ricky_knuckles
ricky_knuckles
R
edit misreply
@:alhammer
the only thing you can do with regard tot elling your an owner
would be to use isop which unfortunatly applies to both op and owners

Last edited by ricky_knuckles; 09/02/05 04:22 AM.
#110635 09/02/05 05:10 AM
F
Fantas
Fantas
F
well how about this?
on 1:join:#:{
if ($me isowner $chan) { /prop $chan ownerkey $$?="Enter key:" }
}

#110636 09/02/05 08:33 AM
D
DaveC
DaveC
D
Quote:
$? and $input don't work in events, but here's a way around that:

Code:
alias myinputbox { return $?=" $+ $1" }
on me:*:join:#: { .timer 1 0 prop $chan ownerkey $myinputbox(Owner Key?) }


Wont that attempt to evaluate $myinputbox while setting up the timer? or was that what you wanted it to do, and using the alias/identifer is a way of oling the "cant use in events" protection system?

#110637 09/02/05 08:59 AM
Joined: Feb 2004
Posts: 2,013
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Feb 2004
Posts: 2,013
Yeah, tidy's suggestion doesn't work. The reason is because that custom identfier of his returns the $?, and as we all know, that is first evaluated before the alias returns the value, so it is the same as directly putting $?/$input in the timer, thus gives the error that it can't be used in an event.

The solution would be to escape the custom alias either in the timer itself, or in the return part of the custom alias. Though that's a bit silly when we can put the escaped input directly in the timer.

on me:*:join:#: .timer 1 0 prop $chan $!input(Please set ownerkey,eo)

#110638 09/02/05 01:04 PM
Joined: Feb 2005
Posts: 193
A
Vogon poet
OP Offline
Vogon poet
A
Joined: Feb 2005
Posts: 193
Code:
 on me:*:join:#: .timer 1 0 prop $chan $!input(Please set ownerkey,eo) 
 
...doesn't work frown This is the only code i actually was prompted with a popup, however, when i typed in the pass, I recieved this error:
Code:
 #test Bad property specified 
Any ideas?

Also, I dont't want to confuse anybody, but on top of setting the pass with the dialog, is there a way to replace "blahblah" in this code:
Code:
 on *:kick:#:{ if ($knick == $me) { timer 1 1 join $chan blahblah } } 
...with the pass I typed in the dialog. I think you could use variables? confused Also, what would i need to add to that command to make it kick the person who kick me after i rejoin, and enter the pass to q myself?? Hopefully i didn't confuse anybody. Thanks again!

#110639 09/02/05 01:49 PM
Joined: Feb 2004
Posts: 2,013
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Feb 2004
Posts: 2,013
Ummm,

Quote:
#test Bad property specified

is not an mIRC error, nor the error that everyone has been talking about (that you cannot use $input in an event)

The bad property error msg comes from your own code, the /prop alias, which you have not showed us. We are not wizards, unless you show the /prop alias we can't help you.

Or is this some kind of special network command that only works on certain networks? Never heard of it.

Greets

#110640 09/02/05 04:53 PM
Joined: Nov 2003
Posts: 2,321
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,321
PROP is a command on IRCX servers, he forgot to specify the property he wants to change:

Code:
.timer 1 0 prop $chan [color:red]ownerkey[/color] $!input(Please set an ownerkey,eo)


Link Copied to Clipboard