mIRC Homepage

Messagebox if User joins

Posted By: teccheck

Messagebox if User joins - 29/05/12 06:47 PM

Hello everyone.

I'm looking for a script.

I want to have a messagebox - popup if a specific user like "XYZ" joins the channel. In the box should be a text like "XYZ has join" and a button to close the box.

It would be very nice if someone could give me the script because I'm not good in scripting.

Thanks
teccheck
Posted By: Wims

Re: Messagebox if User joins - 29/05/12 06:59 PM

If you are looking for a specific channel too, change # to the channel name:
Code:
on !*:join:#:if ($nick == XYZ) noop $input($nick joined $chan,wo,Alert)
Posted By: teccheck

Re: Messagebox if User joins - 31/05/12 08:42 AM

Thank you for your help, but your code is not working.I get a message :


$input: cannot use in an event
Posted By: sparta

Re: Messagebox if User joins - 31/05/12 09:59 AM

Try this code
Code:
on !*:join:#: { 
 if ($nick == Nick1) { noop $tip($nick,Join,$nick joined $chan,5,,,echo,$wid) }
 elseif ($nick == Nick2) { noop $tip($nick,Join,$nick joined $chan,5,,,echo,$wid) }
}

Replace Nick1 with any nick, same goes for Nick2, you can remove the second nick or add more users if you want to, just copy the last line and replace the Nick2 part. This will open a small window in the right corner of your screen.
Posted By: teccheck

Re: Messagebox if User joins - 31/05/12 10:13 AM

Thanks! This is very good.

Is it possible to programm it like to get a "Messagebox" like an error in windows? I use a querymanager and if someone writes me I get a box "XYZ like to have query" and a then two buttons aceppt or decline. How is this window made? It would be better to have this, becaus i would better notice it. smile
Posted By: sparta

Re: Messagebox if User joins - 31/05/12 10:27 AM

Maybe you can call a alias.
Code:
if ($nick == Nick1) { noop $tip($nick,Join,$nick joined $chan,5,,,echo,$wid) | user.joined }

alias user.joined { .echo -q $input($nick joined $chan,wo,Alert) }

If this result in the same error as befor, try use a timer with the code.
Code:
if ($nick == Nick1) { noop $tip($nick,Join,$nick joined $chan,5,,,echo,$wid) | .timeruser 1 1 user.joined }
Posted By: teccheck

Re: Messagebox if User joins - 31/05/12 11:32 AM

Thanks very much! This one works fine!

There is a Bug, but i don't care, i putted my on text in the Alert box.

Your script doesn't recognized the $nick and $chan in the alias, it just showed " (space) joinded (space) "

But thanks for the script. Very good!
Posted By: sparta

Re: Messagebox if User joins - 31/05/12 11:40 AM

Set the values in variables, then call them with the alias.
Code:
if ($nick == Nick1) { noop $tip($nick,Join,$nick joined $chan,5,,,echo,$wid) | set %user.nick $nick | set %user.join $chan | user.joined }
alias user.joined { .echo -q $input(%user.nick joined %user.join,wo,Alert) }

Untested, but i hope it working..
© 2020 mIRC Discussion Forums