Scripthelp reddit / irc ---------------------------------------------------------------------- danteafk · 2017-01-05 17:19 Hi folks, is it possible to create an autoresponse if somone for example from webchat logs in ? I have this here, but this reacts only on chat entry, can it read the host somehow on join? on *:TEXT:webchat:#uthgard:/say ^webchatuser detected Thanks ---------------------------------------------------------------------- mircscript · 2017-01-05 17:54 You can use the ON JOIN event to trigger when a nickname joins the channel. on *:join:#uthgard: { commands here } You can use $address() to get their hostmask. Look up the $mask identifier in mIRC's help file to see how to use $address. For example: $address(SomeGuy,5) would evaluate to their full hostmask: SomeGuy!someuser@some.host Inside of an ON JOIN event, $nick will evaluate to the nickname of the person who joined. As an example, lets say I wanted to say something to every nickname joining with a comcast.net domain at the end of their host.. something like this would work: on *:join:#uthgard: { if (*comcast.net iswm $address($nick,2)) { msg $chan Hey $nick $+ , you should consider changing internet service providers! } } In mIRC you can get help on 95% of the scripting language by using the help file. A quick way to access specfic parts of it is to use the /help command. Here are some things you should look up: /help on join /help if then else /help $nick /help $chan /help $address /help $mask Let me know if you need help with anything else or have trouble with something, I'll be glad to help. ---------------------------------------------------------------------- danteafk · 2017-01-05 17:58 Thanks so much, this makes sense. I understand the hostmark thing, but how do I pinpoint it to just webchat users? ---------------------------------------------------------------------- mircscript · 2017-01-05 17:59 Can you provide an example of how the host looks from a webchat user? ---------------------------------------------------------------------- danteafk · 2017-01-05 18:04 It's always different (07webchat@h-157-53.a357.priv.bahnhof.se09) (webchat@172-126-252-24.lightspeed.bcvloh.sbcglobal.net) (webchat@ip1f11f9ff.dynamic.kabel-deutschland.de) I just want it to respond to anything joining from a webchat client. ---------------------------------------------------------------------- mircscript · 2017-01-05 18:14 It looks like the username always has "webchat" in it. If that's correct, then you could do something like this: on *:join:#uthgard: { if (webchat isin $address($nick,1)) { msg #chan Hello $nick $+ ! You are probably a webchat user. } } There is no surefire way to say for certain that a user is a webchat user. Someone who's using a normal IRC client could simply put "webchat" in their user field, for example. It might also be possible for a webchat user to change their user (some allow this, some don't) in the web client. The other option is: If the webchat client has a unique CTCP VERSION response, you could have your bot CTCP VERSION every person joining the channel, and if the response is from the web client you want to act on, act on it. A lot of people would find this annoying though, and CTCP VERSION responses can be blocked, or changed depending on the features of the IRCd and web client. ---------------------------------------------------------------------- danteafk · 2017-01-05 18:31 Thanks man, you da mvp! Have a fantastic weekend! ---------------------------------------------------------------------- mircscript · 2017-01-05 18:32 You're welcome! Hope you have a good weekend, too. :)