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

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

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



Auto reply query

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

21

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

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?

Для решения этой проблемы вы можете добавить все ники ваших друзей в список исключения "Exclusion nicks", либо в момент, когда вы находитесь в сети, вам необходимо будет изменить ваш ник, который должен отличаться от ника, сохранённого в переменной "%arq_nick_off".

Но я сделал некоторое дополнение в коде при помощи обработчика событий "on INPUT". Теперь, если вы сами открываете приватное окно и отправляете первое сообщение, то ник этого пользователя будет сохранён во вторую хэш-таблицу, чтобы иметь запись для проверки существования там этого ника, которому не следует отправлять авто сообщение. Ещё, при нажатии по пункту "Reset hash nicks" теперь будут удалены сразу обе хэш-таблицы со всеми записями сохранённых там ников. К тому же вы должны знать, что после закрытия mIRC клиента все хеш-таблицы также автоматически обнуляются.


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

Код:
#anti-pv off
on *:TEXT:*:?:{
  if ($me == %arq_nick_off && !$hget(arq_no,$nick)) {
    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 }
  }
}
on *:INPUT:?: if (!$hget(arq_no,$active)) .hadd -m arq_no $active 1
#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 - Yes, Close query - No) : %arq_close = $$?!="Do you want query windows to close auto?"
  .Reset hash nicks : .hfree -sw arq* | .echo -a All hash entries with nicks have been removed.
}
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:#4897E7;}.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]

22

Yes clearly it was a problem that did not require as a solution the exclusion of nicknames or the change of nick with another that does not make the script work.

The update you made is the right solution.

Often I write to nicknames who are not friends (when someone asks for help in the channel for example and I go to write to them in private) and that I don't have to add to the exclusion list, in that case the message was sent even when I wrote the first one to them time and there was no need.

Let's say that I realized that this update could be needed, I saved both versions of the script and after a few uses I will see how I feel better, thanks again!  http://www.kolobok.us/smiles/big_standart/good2.gif