mIRC Homepage


Posted By: ovelayer

reconnect - 04/04/18 02:46 PM

i am working with this script
what i would like to do is add an on disconnect part
as of right now if it disconnects it will just just to reconnect without the pre-defined settings..
so what i would like is..if you get disconnected it need to check the setting and if that network is in settings it needs to use those predefined setting to attempt the re-connect.
i tried:
on *:disconnect: {
  if ($ini(autojoin.ini,networks,$network)) {
    if ($network == My-Net) { /server server:+port user:pass }

on *:disconnect: {
  if ($ini(autojoin.ini,networks,0)) {
    var %a = 1, %z $ini(autojoin.ini,networks,0)
    while (%a <= %z) {
      $iif(%a == 1,server,server -m) $iif($readini(autojoin.ini,$ini(autojoin.ini,networks,%a),server) != irc.twitch.tv,$+($readini(autojoin.ini,$ini(autojoin.ini,networks,%a),server),:,$readini(autojoin.ini,$ini(autojoin.ini,networks,%a),portnum)) $iif($readini(autojoin.ini,$ini(autojoin.ini,networks,%a),ZNCConn) == on,$+($readini(autojoin.ini,$ini(autojoin.ini,networks,%a),ZNCUser),:,$readini(autojoin.ini,$ini(autojoin.ini,networks,%a),ZNCPass))),$+($readini(autojoin.ini,$ini(autojoin.ini,networks,%a),server),:,$readini(autojoin.ini,$ini(autojoin.ini,networks,%a),portnum)) $readini(autojoin.ini,$ini(autojoin.ini,networks,%a),password) -i $readini(autojoin.ini,$ini(autojoin.ini,networks,%a),nick) -j $lower($readini(autojoin.ini,$ini(autojoin.ini,networks,%a),channels)))
      inc %a

neither check to see if the server window is allready open and appy the predefined settings to those open server windows...

any help is appreciated..
© 2021 mIRC Discussion Forums