mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Sep 2013
Posts: 61
E
Babel fish
OP Offline
Babel fish
E
Joined: Sep 2013
Posts: 61
I might not be able to do this, but wanted to ask.

As Eggbot is hosted on a thin client running windows 10, there are typically windows updates that need installing. I've set it so a manual restart is required, and I usually do this during the evening, when most channels are not live, however, if a restart is forced, I want to be able to send a message to all connected channels, stating: "The EggBot Server is required to be restarted to install updates. During this time, EggBot will not be responsive for between 5-10 minutes. Please Wait, and the bot will reconnect to the channel."

I've tried utilising /scon -a , but this doesn't seem to be working, or I don't understand the command / syntax well enough to code it correctly.

Hoping someone can shed some light / point me in the right direction

And before anyone states, it'll be a command only I can initiate, due to -scon being abusable.

TiA
Egg


Twitch Live-Streamer:
Synth Riders
Beat Saber
www.twitch.tv/eggfriedcheese
Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
Can you re-explain what you're wanting? At first it sounded like you wanted something that could detect that windows was wanting to do an update-shutdown, but then it seems like you want an alias that will let you send a message to all channels on all network connections. If it's the latter, that's the question to ask and no need to mention updates

Joined: Sep 2013
Posts: 61
E
Babel fish
OP Offline
Babel fish
E
Joined: Sep 2013
Posts: 61
Ideally, both, but the latter is most important right now

When I do a manual restart, using the command to send to all channels is a good start

If it's an automatic restart, if there's a way to detect it, and message, that would be ideal.

Last edited by EggFriedCheese; 22/06/22 12:45 PM.

Twitch Live-Streamer:
Synth Riders
Beat Saber
www.twitch.tv/eggfriedcheese
Joined: Sep 2013
Posts: 61
E
Babel fish
OP Offline
Babel fish
E
Joined: Sep 2013
Posts: 61
Anyone have any progress on this? Still not been able to get $scon working


Twitch Live-Streamer:
Synth Riders
Beat Saber
www.twitch.tv/eggfriedcheese
Joined: Sep 2013
Posts: 61
E
Babel fish
OP Offline
Babel fish
E
Joined: Sep 2013
Posts: 61
Okay, used the example of $scon I found, and now I'm able to broadcast on all channels at the same time!

Code
/*
** Global amsg - performs an amsg on all the
** the actives connections you are on.
**
** /gamsg <message>
*/
alias gamsg {
  if (!$1) {
    echo -gtcse info * /gamsg: insufficient parameters
    halt
  }
  ; all active connections
  scon -at1 amsg $unsafe($1-)
}

on *:TEXT:!botrestart:#: {
  .gamsg Please Note, the bot is required to be restarted due to updates. During this time the bot will be unresponsive. Thank you for your understanding.
}


Twitch Live-Streamer:
Synth Riders
Beat Saber
www.twitch.tv/eggfriedcheese
Joined: Sep 2013
Posts: 61
E
Babel fish
OP Offline
Babel fish
E
Joined: Sep 2013
Posts: 61
Okay, so in regards to the above, as long as the message seems to be less than 15 characters, it sends to all channels successfully, however sending a longer message only gets delivered to the first handful of channels, and not all.

What I need now, is a way to delay the below, so there's 2 seconds between each message sending (without needing to add every channel into the code with a timer).

(The message is showing up in the IRC client, but not showing in the twitch chat, which I feel is being hit by twitch chat limits, hence the reason for the delay)

Code
on *:TEXT:!botrestart:#: {
  if ($nick != eggfriedcheese) { return }
  .gamsg Please Note, the bot machine is required to be restarted due to updates. During this time the bot will be unresponsive. Thank you for your understanding.
}



Code
on *:TEXT:!global *:#: {
  if ($nick != eggfriedcheese) { return }
  .gamsg $2-
}

Last edited by EggFriedCheese; 06/07/22 06:41 AM.

Twitch Live-Streamer:
Synth Riders
Beat Saber
www.twitch.tv/eggfriedcheese
Joined: Sep 2013
Posts: 61
E
Babel fish
OP Offline
Babel fish
E
Joined: Sep 2013
Posts: 61
FURTHER EDIT:

Worked out it can be done like this:
Code
/*
** /delayscon <message>
*/
alias delayscon {
  var %a 1
  while ($scon(%a)) {
    scon %a
    .timerscon $+ %a 1 $calc((%a -1) * 2) $unsafe($1-)
    inc %a
  }
}


Twitch Live-Streamer:
Synth Riders
Beat Saber
www.twitch.tv/eggfriedcheese

Link Copied to Clipboard