EpicNet.Ru - Форум IRC Чата

Информация о пользователе

Привет, Гость! Войдите или зарегистрируйтесь.



Auto reply query

Сообщений 1 страница 20 из 22

1

Hi! I need some help on this script

Код:
#anti-pv off
on *:TEXT:*:?: if ($me == MyNick) { /msg $nick The auto query is active }
#anti-pv END

menu menubar {
  Auto-reply query
  .$iif($group(#anti-pv).status == on,$style(1)) Active : .enable #anti-pv | window -ez @AutoReplyON
  .$iif($group(#anti-pv).status == off,$style(1)) Disabled : .disable #anti-pv | /close -@ @AutoReplyON
}

ON *:CONNECT: { 
  .enable #anti-pv | window -ez @AutoReplyON
}

ON *:EXIT: { 
  .disable #anti-pv
}

The first problem is: how do I get the message to appear only once? When the script is active, every time they write me a message it repeats, I would like the automatic reply message to be sent only once.

Second problem: how can I prevent the message from being sent as soon as i connect to the nicknames who wrote me in private when I was offline? Like, if my nick is always online in bnc, and i connect, the script is activated thanks to the on connect event, and the message is sent to whoever wrote me... is it possible to avoid this thing? I state that I have not yet tried if it happens, but I assumed it could happen.

Third, this is not a problem but a possible addition: is it possible to create a list of nicknames, registered and unregistered (all those that are put on the list in short) who can write to me without the message appearing? A kind of nick exception.

2

1345,366 написал(а):

The first problem is: how do I get the message to appear only once? When the script is active, every time they write me a message it repeats, I would like the automatic reply message to be sent only once.

Я решил эту проблему при помощи команды создания хэщ-таблицы ".hadd -mz arq $nick 3600". Теперь каждый ник, который получил авто сообщение будет сохранён в хэш-таблицу на 3600 секунд = 1 час (вы можете изменить это время). При проверке условием "if (!$hget(arq,$nick))" все отсутствующие в хэш-таблице ники будут получать авто сообщение, кроме тех, кто там уже записан.


1345,366 написал(а):

Second problem: how can I prevent the message from being sent as soon as i connect to the nicknames who wrote me in private when I was offline? Like, if my nick is always online in bnc, and i connect, the script is activated thanks to the on connect event, and the message is sent to whoever wrote me... is it possible to avoid this thing? I state that I have not yet tried if it happens, but I assumed it could happen.

Я решил эту проблему при помощи команды таймера для алиаса ".timerARQ -m 1 3000 arq_enable". Теперь после подключения к сети для активизации скрипта будет использоваться задержка на 3000 миллисекунд = 3 секунды (вы можете изменить это время). Это значит, что все сообщения, которые были оставлены для вашего аккаунта BNC в момент вашего отсутствия будут проигнорированы скриптом и не получат в ответ авто сообщение.


1345,366 написал(а):

Third, this is not a problem but a possible addition: is it possible to create a list of nicknames, registered and unregistered (all those that are put on the list in short) who can write to me without the message appearing? A kind of nick exception.

Я добавил в меню новый пункт "Exclusion nicks", который выполняет алиас "arq_exc_nicks" для создания и открытия текстового файла, в котором вы сможете записать (в столбик) все ники для исключения. Вы можете изменить путь к файлу в значении переменной "%arq_path = scripts\arq_nicks.txt".


Итак, вы можете попробовать использовать эту версию скрипта с обновлением вашего кода:

Код:
#anti-pv off
on *:TEXT:*:?:{
  if (!$read(%arq_path, w, $nick)) {
    if (!$hget(arq,$nick)) {
      .msg $nick The auto query is active | .hadd -mz arq $nick 3600
      if (!$window(@AutoReplyQuery)) .window -ez @AutoReplyQuery
      .aline -hp @AutoReplyQuery $+([,$time,]) $nick - was denied access to private.
    }
    .close -m $nick
  }
  else { if ($hget(arq,$nick)) .hdel -sw arq $nick }
}
#anti-pv END
---------------------------------------------------
menu menubar,status,channel,query,@AutoReplyQuery {
  Auto-reply-query
  .$iif($group(#anti-pv).status == on,$style(1)) Enabled : arq_enable
  .$iif($group(#anti-pv).status == off,$style(1)) Disabled : arq_disable
  .-
  .Reset hash nicks : .hfree -sw arq | .echo -a Reset hash nicks.
  .-
  .Exclusion nicks : arq_exc_nicks
}
on *:CONNECT: .timerARQ -m 1 3000 arq_enable
on *:EXIT: arq_disable
---------------------------------------------------
alias arq_enable { .enable #anti-pv | .window -ez @AutoReplyQuery }
alias arq_disable { .disable #anti-pv | .close -@ @AutoReplyQuery }
alias arq_exc_nicks { %arq_path = scripts\arq_nicks.txt | if (!$exists(%arq_path)) .write %arq_path | .run %arq_path }
Подпись автора

[html]<style>img {vertical-align:middle;}.hnet{color:#FFFFFF;}.hstar{color:#DE0000;}.htext{font-family:Verdana;font-size:13px;color:#6E1E00;}.heading{font-family:Verdana;font-size:13px;font-weight:bold;background-color:#4898CD;}.stitle{font-family:Verdana;font-size:12px;}.dot{color:#808000;}.desc{color:#ADADAD;}a .curl{font-family:Verdana;font-size:13px;color:#3A92CD;}</style><table><tr><td width="20px" height="20px"><img src="http://forumstatic.ru/files/000d/c9/8c/34681.jpg"></td><td><a href="http://forum.epicnet.ru/viewtopic.php?id=234"><span class="heading"> <span class="hstar">★</span> <span class="hnet">EpicNet.Ru</span> <span class="hstar">★</span> </span><span class="htext"> - IRC Чат © 2008</span></a></td></tr><tr><td></td><td><div class="stitle"><span class="dot">•</span> <span class="desc">Вход через вебгейт:</span> <a href="http://irc.epicnet.ru"><span class="curl">http://irc.epicnet.ru</span></a><br><span class="dot">•</span> <span class="desc">Сервер:</span> irc.epicnet.ru <span class="desc">Порты:</span> 6667, 6668 (ssl)<br><div></td></tr></table>[/html]

3

Thanks a lot Epic! I am testing it and it works perfectly.

I just have a few questions:

1: To remove the automatic closing of the query when they write to me, I just need to remove this line, right?

Код:
 .close -m $nick

2: The "Reset hash nicks" entry, if I understand correctly, only removes the nicknames in the provisional list, right? Not the ones that are in the "arq_nicks.txt" file (and that's okay, I'm better off adding and removing them from the .txt manually)

3: If I wanted to remove the message that warns me of the query denied to the nick, would it be enough for me to remove this line?

Код:
.aline -hp @AutoReplyQuery $+([,$time,]) $nick - was denied access to private.

4: Still as regards the line of code above, can I modify it without problems in case I want to keep it to make other useful information appear instead of the message? Like, common channels of the nick who wrote me and things like that...

4

1347,366 написал(а):

1: To remove the automatic closing of the query when they write to me, I just need to remove this line, right?

Да. Вы можете либо закомментировать эту строку ";.close -m $nick", либо просто удалить её.


1347,366 написал(а):

2: The "Reset hash nicks" entry, if I understand correctly, only removes the nicknames in the provisional list, right? Not the ones that are in the "arq_nicks.txt" file (and that's okay, I'm better off adding and removing them from the .txt manually)

Этот список никак не связан с файлом "arq_nicks.txt". Этот пункт меню служит для удаления всех ников хранящихся в хэш-таблице, которые получили от вас уже одно авто сообщение и больше не могут получить его повторно в течении определённого времени. При необходимости вы можете удалить их, чтобы дать возможность получить от вас повторное авто сообщение.


1347,366 написал(а):

3: If I wanted to remove the message that warns me of the query denied to the nick, would it be enough for me to remove this line?

Да. Вы можете либо закомментировать эту строку ";.aline -hp @AutoReplyQuery $+([,$time,]) $nick - was denied access to private.", либо просто удалить её.


1347,366 написал(а):

4: Still as regards the line of code above, can I modify it without problems in case I want to keep it to make other useful information appear instead of the message? Like, common channels of the nick who wrote me and things like that...

Да, конечно. Вы можете использовать эту строку с командой ".aline -hp @AutoReplyQuery - any of your text" для добавления любой необходимой вам информации в окно "@AutoReplyQuery" в момент, когда срабатывает это событие. Подробнее о команде: https://en.wikichip.org/wiki/mirc/commands/aline

Подпись автора

[html]<style>img {vertical-align:middle;}.hnet{color:#FFFFFF;}.hstar{color:#DE0000;}.htext{font-family:Verdana;font-size:13px;color:#6E1E00;}.heading{font-family:Verdana;font-size:13px;font-weight:bold;background-color:#4898CD;}.stitle{font-family:Verdana;font-size:12px;}.dot{color:#808000;}.desc{color:#ADADAD;}a .curl{font-family:Verdana;font-size:13px;color:#3A92CD;}</style><table><tr><td width="20px" height="20px"><img src="http://forumstatic.ru/files/000d/c9/8c/34681.jpg"></td><td><a href="http://forum.epicnet.ru/viewtopic.php?id=234"><span class="heading"> <span class="hstar">★</span> <span class="hnet">EpicNet.Ru</span> <span class="hstar">★</span> </span><span class="htext"> - IRC Чат © 2008</span></a></td></tr><tr><td></td><td><div class="stitle"><span class="dot">•</span> <span class="desc">Вход через вебгейт:</span> <a href="http://irc.epicnet.ru"><span class="curl">http://irc.epicnet.ru</span></a><br><span class="dot">•</span> <span class="desc">Сервер:</span> irc.epicnet.ru <span class="desc">Порты:</span> 6667, 6668 (ssl)<br><div></td></tr></table>[/html]

5

Ok perfect, all clear. Everything works perfectly, in case there is any problem I will update the discussion!

Thank you so much for your help!

6

There is a small problem, or rather, a strange thing that happens:

I tried to connect via browser to the chat and write a message to my nickname (nick that was online, not offline), and, as soon as I wrote the message, the message of the script that I had set appeared, in short, the script worked, but when I went to mirc to see the query, there was only the message of the nick and not my answer!

Example to better understand:

Browser Chat:
Nick 1: Hello!
Nick 2: Hi, this is an autoresponder!

And here everything seems ok, the script works ... But then when I go to see the query on mIRC, there is only this:

Nick 1: Hello!

And that's it ... There is not my automatic message, but on the browser chat instead the automatic message is there!

How is it possible?

7

1350,366 написал(а):

I tried to connect via browser to the chat and write a message to my nickname (nick that was online, not offline), and, as soon as I wrote the message, the message of the script that I had set appeared, in short, the script worked, but when I went to mirc to see the query, there was only the message of the nick and not my answer!

Просто это магия  ✨ http://www.kolobok.us/smiles/big_standart/greeting.gifhttp://epicnet.ru/smiles/kolobok/cool.gif

На самом деле мне показалось, что это необязательно видеть, так как вы итак знаете какой текст в авто сообщении.
Но если вы всё-таки хотите видеть собственные авто сообщения, то уберите из команды точку ".msg" ➔ "msg".

Подпись автора

[html]<style>img {vertical-align:middle;}.hnet{color:#FFFFFF;}.hstar{color:#DE0000;}.htext{font-family:Verdana;font-size:13px;color:#6E1E00;}.heading{font-family:Verdana;font-size:13px;font-weight:bold;background-color:#4898CD;}.stitle{font-family:Verdana;font-size:12px;}.dot{color:#808000;}.desc{color:#ADADAD;}a .curl{font-family:Verdana;font-size:13px;color:#3A92CD;}</style><table><tr><td width="20px" height="20px"><img src="http://forumstatic.ru/files/000d/c9/8c/34681.jpg"></td><td><a href="http://forum.epicnet.ru/viewtopic.php?id=234"><span class="heading"> <span class="hstar">★</span> <span class="hnet">EpicNet.Ru</span> <span class="hstar">★</span> </span><span class="htext"> - IRC Чат © 2008</span></a></td></tr><tr><td></td><td><div class="stitle"><span class="dot">•</span> <span class="desc">Вход через вебгейт:</span> <a href="http://irc.epicnet.ru"><span class="curl">http://irc.epicnet.ru</span></a><br><span class="dot">•</span> <span class="desc">Сервер:</span> irc.epicnet.ru <span class="desc">Порты:</span> 6667, 6668 (ssl)<br><div></td></tr></table>[/html]

8

Oh, it really was magic then  http://epicnet.ru/smiles/kolobok/rofl.gif

I prefer the message to appear, if it doesn't appear it looks like it doesn't work, and when I sent the message myself to my nick, which appeared on one side and on the other not, I was like... wtf  http://www.kolobok.us/smiles/icq/wacko1.gif

It's okay now, thanks  http://www.kolobok.us/smiles/icq/drinks.gif

9

Ok I found another little problem.

In the script I posted in the first message there was this piece of code:

Код:
if ($me == MyNick)

This is because I only need the script to work when I have a specific nick. Is it possible to add this functionality please?

10

1353,366 написал(а):

This is because I only need the script to work when I have a specific nick. Is it possible to add this functionality please?

Да, конечно. Вы можете добавить это в код в качестве ещё одного условия "if ($me == MyNick)".
Но я решил добавить в меню ещё один пункт "Set offline nick" для более удобной настройки необходимого вам ника, который будет сохранён в переменной "%arq_nick_off".


Таким образом обновлённый код скрипта теперь выглядит так:

Код:
#anti-pv off
on *:TEXT:*:?:{
  if ($me == %arq_nick_off) {
    if (!$read(%arq_path, w, $nick)) {
      if (!$hget(arq,$nick)) {
        .msg $nick The auto query is active | .hadd -mz arq $nick 3600
        if (!$window(@AutoReplyQuery)) .window -ez @AutoReplyQuery
        .aline -hp @AutoReplyQuery $+([,$time,]) $nick - was denied access to private.
      }
      .close -m $nick
    }
    else { if ($hget(arq,$nick)) .hdel -sw arq $nick }
  }
}
#anti-pv END
---------------------------------------------------
menu menubar,status,channel,query,@AutoReplyQuery {
  Auto-reply-query
  .$iif($group(#anti-pv).status == on,$style(1)) Enabled : arq_enable
  .$iif($group(#anti-pv).status == off,$style(1)) Disabled : arq_disable
  .-
  .Set offline nick : %arq_nick_off = $$?="Enter the nick with which the script should work:"
  .-
  .Reset hash nicks : .hfree -sw arq | .echo -a Reset hash nicks.
  .-
  .Exclusion nicks : arq_exc_nicks
}
on *:CONNECT: .timerARQ -m 1 3000 arq_enable
on *:EXIT: arq_disable
---------------------------------------------------
alias arq_enable { .enable #anti-pv | .window -ez @AutoReplyQuery }
alias arq_disable { .disable #anti-pv | .close -@ @AutoReplyQuery }
alias arq_exc_nicks { %arq_path = scripts\arq_nicks.txt | if (!$exists(%arq_path)) .write %arq_path | .run %arq_path }
Подпись автора

[html]<style>img {vertical-align:middle;}.hnet{color:#FFFFFF;}.hstar{color:#DE0000;}.htext{font-family:Verdana;font-size:13px;color:#6E1E00;}.heading{font-family:Verdana;font-size:13px;font-weight:bold;background-color:#4898CD;}.stitle{font-family:Verdana;font-size:12px;}.dot{color:#808000;}.desc{color:#ADADAD;}a .curl{font-family:Verdana;font-size:13px;color:#3A92CD;}</style><table><tr><td width="20px" height="20px"><img src="http://forumstatic.ru/files/000d/c9/8c/34681.jpg"></td><td><a href="http://forum.epicnet.ru/viewtopic.php?id=234"><span class="heading"> <span class="hstar">★</span> <span class="hnet">EpicNet.Ru</span> <span class="hstar">★</span> </span><span class="htext"> - IRC Чат © 2008</span></a></td></tr><tr><td></td><td><div class="stitle"><span class="dot">•</span> <span class="desc">Вход через вебгейт:</span> <a href="http://irc.epicnet.ru"><span class="curl">http://irc.epicnet.ru</span></a><br><span class="dot">•</span> <span class="desc">Сервер:</span> irc.epicnet.ru <span class="desc">Порты:</span> 6667, 6668 (ssl)<br><div></td></tr></table>[/html]

11

Ok I added the new code portions and everything looks ok now.

Just one thing, is it possible to show the nick under which the addon should work in the same menu you just created?

Here:

Код:
.Set offline nick : %arq_nick_off = $$?="Enter the nick with which the script should work:"

Here where you add the nick it would be nice to have something next to it, after choosing the nick, that says like "the current nick is Billy".

12

1355,366 написал(а):

Just one thing, is it possible to show the nick under which the addon should work in the same menu you just created?
Here where you add the nick it would be nice to have something next to it, after choosing the nick, that says like "the current nick is Billy".

Да, конечно это можно сделать в коде. Для этого потребуется внести некоторые изменения и добавить несколько новых строк.


Замените эту строку:

Код:
.Set offline nick : %arq_nick_off = $$?="Enter the nick with which the script should work:"

На такую часть кода:

Код:
.$iif(%arq_nick_off, $style(1) %arq_nick_off - (offline nick), Set offline nick)
..Edit : %arq_nick_off = $$?="Enter the nick with which the script should work:"
..Delete : unset %arq_nick_off

На мой взгляд это выглядит хорошо http://www.kolobok.us/smiles/big_standart/ok.gif

Подпись автора

[html]<style>img {vertical-align:middle;}.hnet{color:#FFFFFF;}.hstar{color:#DE0000;}.htext{font-family:Verdana;font-size:13px;color:#6E1E00;}.heading{font-family:Verdana;font-size:13px;font-weight:bold;background-color:#4898CD;}.stitle{font-family:Verdana;font-size:12px;}.dot{color:#808000;}.desc{color:#ADADAD;}a .curl{font-family:Verdana;font-size:13px;color:#3A92CD;}</style><table><tr><td width="20px" height="20px"><img src="http://forumstatic.ru/files/000d/c9/8c/34681.jpg"></td><td><a href="http://forum.epicnet.ru/viewtopic.php?id=234"><span class="heading"> <span class="hstar">★</span> <span class="hnet">EpicNet.Ru</span> <span class="hstar">★</span> </span><span class="htext"> - IRC Чат © 2008</span></a></td></tr><tr><td></td><td><div class="stitle"><span class="dot">•</span> <span class="desc">Вход через вебгейт:</span> <a href="http://irc.epicnet.ru"><span class="curl">http://irc.epicnet.ru</span></a><br><span class="dot">•</span> <span class="desc">Сервер:</span> irc.epicnet.ru <span class="desc">Порты:</span> 6667, 6668 (ssl)<br><div></td></tr></table>[/html]

13

Thanks, that's perfect. Much more intuitive.

One question: can you tell me why when I connect (not when I am connected, but only when I open mirc and I connect for the first time after a few hours that I was not connected) and there are nicknames who wrote to me in private, does the autoresponder message appear, but without it being sent to them?

It appears right in the private chat where they wrote to me, I thought that the message was simply sent 3 seconds after the connection and that therefore there was something to fix, but no one replied even if the nicknames they wrote me were online, so it simply appears the message (sometimes it seems, not always) without being sent...

I'll try to see better if it happens again  http://www.kolobok.us/smiles/icq/unknown.gif

14

1357,366 написал(а):

One question: can you tell me why when I connect (not when I am connected, but only when I open mirc and I connect for the first time after a few hours that I was not connected) and there are nicknames who wrote to me in private, does the autoresponder message appear, but without it being sent to them?

It appears right in the private chat where they wrote to me, I thought that the message was simply sent 3 seconds after the connection and that therefore there was something to fix, but no one replied even if the nicknames they wrote me were online, so it simply appears the message (sometimes it seems, not always) without being sent...

К сожалению я не могу правильно понять ваш вопрос при переводе текста. Если у вас остались не решённые проблемы в работе скрипта, то пожалуйста попробуйте сформулировать ваш вопрос более подробно с описанием последовательности действий, которые приводят к возникновению проблемы. Можете ли вы записать видео ролик, чтобы я смог увидеть как это выглядит?

Вы также можете посетить IRC чат для онлайн обсуждения вашего вопроса. Для этого воспользуйтесь вебгейтом: http://irc.epicnet.ru
Или введите в mIRC команду "/server -m irc.epicnet.ru 6667 -i krisb3421 krisb3421_ krisb3421@email krisb3421 -j #Code".

Подпись автора

[html]<style>img {vertical-align:middle;}.hnet{color:#FFFFFF;}.hstar{color:#DE0000;}.htext{font-family:Verdana;font-size:13px;color:#6E1E00;}.heading{font-family:Verdana;font-size:13px;font-weight:bold;background-color:#4898CD;}.stitle{font-family:Verdana;font-size:12px;}.dot{color:#808000;}.desc{color:#ADADAD;}a .curl{font-family:Verdana;font-size:13px;color:#3A92CD;}</style><table><tr><td width="20px" height="20px"><img src="http://forumstatic.ru/files/000d/c9/8c/34681.jpg"></td><td><a href="http://forum.epicnet.ru/viewtopic.php?id=234"><span class="heading"> <span class="hstar">★</span> <span class="hnet">EpicNet.Ru</span> <span class="hstar">★</span> </span><span class="htext"> - IRC Чат © 2008</span></a></td></tr><tr><td></td><td><div class="stitle"><span class="dot">•</span> <span class="desc">Вход через вебгейт:</span> <a href="http://irc.epicnet.ru"><span class="curl">http://irc.epicnet.ru</span></a><br><span class="dot">•</span> <span class="desc">Сервер:</span> irc.epicnet.ru <span class="desc">Порты:</span> 6667, 6668 (ssl)<br><div></td></tr></table>[/html]

15

Sorry for the translation, I also translate so I guess the translation is not that accurate.

However no, I have no problems with the script for now. Simply sometimes when I connect, in the windows that open, those of the nicknames who had written to me in private when I was offline, the automatic message of the script appears, as if it had replied, but in reality the message is not sent, so I do not understand why the message appears

Something like this:

1: I open mirc and connect

2: After connecting, the queries of the nicknames that had written me offline are opened

3: In the queries that have been opened, the response message of the script appears. But the message doesn't seem to be sent to them, it just appears written

In short, the script works perfectly, the timer you put when it connects makes sure that the message is not sent to the nicknames who wrote me when I connect, there is only this thing that the message a few times, not always if I have seen correctly , it appears written in their queries when I connect.

For now, no problem, I will keep an eye on this and if there are updates I will post everything

16

1359,366 написал(а):

1: I open mirc and connect
2: After connecting, the queries of the nicknames that had written me offline are opened
3: In the queries that have been opened, the response message of the script appears. But the message doesn't seem to be sent to them, it just appears written

Я не смог воспроизвести вашу проблему, но подозреваю, что это может быть связано с тем, что ваши окна могут загружать очень много логов, прежде чем откроются все приватные окна. Поэтому я думаю, что вам стоит попробовать увеличить время таймера для задержки включения скрипта, который срабатывает после того как вы подключаетесь к сети.


Я поработал ещё немного над кодом скрипта и теперь он имеет новые обновления:

  • Добавлен пункт меню "Set timers" для настройки нескольких таймеров задержки - при подключении к сети и при ограничении повторного авто сообщения.

  • Добавлен пункт меню "Close query" для настройки автоматического закрытия приватного окна, когда вы в режиме отсутствия.

  • Пункт меню "Exclusion nicks" теперь будет показывать число записей для исключения и устанавливать рядом галочку в меню, если такие записи имеются.

  • Некоторые другие незначительные изменения в коде.

Попробуйте использовать новую версию скрипта:

Код:
#anti-pv off
on *:TEXT:*:?:{
  if ($me == %arq_nick_off) {
    if (!$read(%arq_path, w, $nick)) {
      if (!$hget(arq,$nick)) {
        msg $nick (Auto message) I'm offline. Please leave your message here. | .hadd -mz arq $nick %arq_mes_time
        if (!$window(@AutoReplyQuery)) .window -enz @AutoReplyQuery
        .aline -hp @AutoReplyQuery $+([,$time,]) $nick - wrote to you in private in your absence.
      }
      if (%arq_close) .close -m $nick
    }
    else { if ($hget(arq,$nick)) .hdel -sw arq $nick }
  }
}
#anti-pv END
---------------------------------------------------
menu menubar,status,channel,query,@AutoReplyQuery {
  Auto-reply-query
  .$iif($group(#anti-pv).status == on, $style(1)) Enabled : arq_enable
  .$iif($group(#anti-pv).status == off, $style(1)) Disabled : arq_disable
  .-
  .$iif(%arq_nick_off, $style(1) Offline nick - %arq_nick_off, Set offline nick)
  ..Edit : %arq_nick_off = $$?="Enter the nick with which the script should work:"
  ..Delete : unset %arq_nick_off
  .$iif($lines(%arq_path) > 0, $style(1) Exclusion nicks = $lines(%arq_path), Exclusion nicks) : arq_exc_nicks
  .-
  .$iif(%arq_con_time && %arq_mes_time, $style(1) Set timers, Set timers)
  ..$iif(%arq_con_time, Connection delay timer = %arq_con_time sec, Connection delay timer) : arq_con_timer
  ..$iif(%arq_mes_time, Repeat message delay timer = %arq_mes_time sec, Repeat message delay timer) : arq_mes_timer
  ..-
  ..Default timers : %arq_con_time = 10 | %arq_mes_time = 3600
  .$iif(%arq_close, $style(1) Close query, Close query) : %arq_close = $$?!="Do you want query windows to close auto?"
  .Reset hash nicks : .hfree -sw arq | .echo -a Reset hash nicks.
}
on *:CONNECT: arq_default | .timerARQ 1 %arq_con_time arq_enable
on *:EXIT: arq_disable
---------------------------------------------------
alias arq_enable { .enable #anti-pv | .window -enz @AutoReplyQuery }
alias arq_disable { .disable #anti-pv | .close -@ @AutoReplyQuery }
alias arq_default { if (!%arq_con_time) %arq_con_time = 10 | if (!%arq_mes_time) %arq_mes_time = 3600 }
alias arq_exc_nicks { %arq_path = scripts\arq_nicks.txt | if (!$exists(%arq_path)) .write %arq_path | .run %arq_path }
alias arq_con_timer { %arq_con_time = $$?="Enter the number of seconds to delay enabling the script on connection:" }
alias arq_mes_timer { %arq_mes_time = $$?="Enter the number of seconds that must elapse before can receive new auto message:" }
Подпись автора

[html]<style>img {vertical-align:middle;}.hnet{color:#FFFFFF;}.hstar{color:#DE0000;}.htext{font-family:Verdana;font-size:13px;color:#6E1E00;}.heading{font-family:Verdana;font-size:13px;font-weight:bold;background-color:#4898CD;}.stitle{font-family:Verdana;font-size:12px;}.dot{color:#808000;}.desc{color:#ADADAD;}a .curl{font-family:Verdana;font-size:13px;color:#3A92CD;}</style><table><tr><td width="20px" height="20px"><img src="http://forumstatic.ru/files/000d/c9/8c/34681.jpg"></td><td><a href="http://forum.epicnet.ru/viewtopic.php?id=234"><span class="heading"> <span class="hstar">★</span> <span class="hnet">EpicNet.Ru</span> <span class="hstar">★</span> </span><span class="htext"> - IRC Чат © 2008</span></a></td></tr><tr><td></td><td><div class="stitle"><span class="dot">•</span> <span class="desc">Вход через вебгейт:</span> <a href="http://irc.epicnet.ru"><span class="curl">http://irc.epicnet.ru</span></a><br><span class="dot">•</span> <span class="desc">Сервер:</span> irc.epicnet.ru <span class="desc">Порты:</span> 6667, 6668 (ssl)<br><div></td></tr></table>[/html]

17

The problem I wrote to you... your suspicion I think is right and that was exactly what I was thinking too!

In practice, when you connect after a lot of time the script has to load a lot of things: messages from the net, chat logs, open the channels that are in autojoin etc etc, and only at the last the queries were opened!

So it probably happened that the 3 seconds had already passed before the queries were even opened, making the script already active, and when the queries were opened, after all the things mentioned above had loaded, the response message was sent ... that's w***t appeared to me.

It also explains w***t happened only a few times, that is only when I connected after a long time: because when you connect after a short time there are fewer things to load, so 3 seconds were enough.

I will do the test with 10 seconds which will surely be enough, but I really think this is it :)

As for the additions you made, great!

Under "Close query", I understand that now I no longer have to put ";" to this line of code ->

Код:
;if (%arq_close) .close -m $nick

I just need to turn off query closing from the option and I'm good to go, right?

Is it possible to make the "Close query" entry more intuitive? That's fine exactly the way it is, I'd just like to add the word "Active" next to it when it's on, and "Disabled" when it's off.

18

1361,366 написал(а):

Under "Close query", I understand that now I no longer have to put ";" to this line of code ";if (%arq_close) .close -m $nick" ?

Да. Я специально добавил этот пункт в меню, чтобы можно было управлять этой опцией без необходимости комментирования внутри кода.
Условие "if (%arq_close)" проверяет, содержит ли переменная значение "$true" или нет. Хотя вы по прежнему можете закомментировать эту строку, если вам так будет удобнее. http://epicnet.ru/smiles/epic-mix/smile_kind.gif


1361,366 написал(а):

I just need to turn off query closing from the option and I'm good to go, right?

Да. Вам просто необходимо кликнуть по пункту "Close query" и во всплывающем диалоговом окне нажать на кнопку "No", чтобы отключить эту опцию в коде.


1361,366 написал(а):

Is it possible to make the "Close query" entry more intuitive? That's fine exactly the way it is, I'd just like to add the word "Active" next to it when it's on, and "Disabled" when it's off.

Это уже сделано при помощи отображаемой галочки на против пункта меню. Если вы хотите, чтобы приватные окна закрывались, то галочка отображается, в противном случае она отсутствует.

При необходимости вы также можете изменить и добавить в пункт меню необходимые вам (метки) слова:

Код:
.$iif(%arq_close, $style(1) Close query - Yes, Close query - No) : %arq_close = $$?!="Do you want query windows to close auto?"
Подпись автора

[html]<style>img {vertical-align:middle;}.hnet{color:#FFFFFF;}.hstar{color:#DE0000;}.htext{font-family:Verdana;font-size:13px;color:#6E1E00;}.heading{font-family:Verdana;font-size:13px;font-weight:bold;background-color:#4898CD;}.stitle{font-family:Verdana;font-size:12px;}.dot{color:#808000;}.desc{color:#ADADAD;}a .curl{font-family:Verdana;font-size:13px;color:#3A92CD;}</style><table><tr><td width="20px" height="20px"><img src="http://forumstatic.ru/files/000d/c9/8c/34681.jpg"></td><td><a href="http://forum.epicnet.ru/viewtopic.php?id=234"><span class="heading"> <span class="hstar">★</span> <span class="hnet">EpicNet.Ru</span> <span class="hstar">★</span> </span><span class="htext"> - IRC Чат © 2008</span></a></td></tr><tr><td></td><td><div class="stitle"><span class="dot">•</span> <span class="desc">Вход через вебгейт:</span> <a href="http://irc.epicnet.ru"><span class="curl">http://irc.epicnet.ru</span></a><br><span class="dot">•</span> <span class="desc">Сервер:</span> irc.epicnet.ru <span class="desc">Порты:</span> 6667, 6668 (ssl)<br><div></td></tr></table>[/html]

19

Ok thanks, all clear and changes made. I added "Yes" and "No" from the query closing menu, otherwise it was less clear from the menu, now it's perfect.

I also confirm that 10 seconds for the connection are perfect, the 3 seconds were few and that's why that little problem happened.

I don't think there is anything else to add, the script is complete so, if there are any problems I will not be able to update the discussion, thanks again!  http://www.kolobok.us/smiles/big_standart/good2.gif

20

I think I found a little problem:

when I am the one to open a query with a nick and write to him, then when the nick replies to me, the auto message appears.

Basically, to the nicknames to which I open a query and to whom I write, when they answer me, the self-message should not appear.

Can this be fixed?