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

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

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



Problem with a whois script

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

1

Hi all!

I have this whois script that I'm very comfortable with:

Код:
menu nicklist {
  — $1  —:whois $$1 $$1
}
raw 311:*:{
  haltdef
  echo -a $timestamp 14|---› 14Nick:0 $2
  echo -a $timestamp 14|---› 14FullName:0 $6-
  echo -a $timestamp 14|---› 14Ident@Ip:0 $3 $+ 14 $+ @ $+ 01 $+ $4
  var %clone = $kanalclone($2)
  if (%clone == $null)   echo -a $timestamp 14|---› 14Clones:0 (No Clone)
  else   echo -a $timestamp 14|---› 14Clone:0 ( $+ $numtok(%clone,44) $+ ) user 04/01 %clone
  haltdef
}
raw 312:*:{
  haltdef
  echo -a $timestamp 14|---› 14Server:0 $3 04/00 $4 $5 $6
}
raw 313:*: {
  haltdef
  echo -a $timestamp 14|---› 14Network Info:0 $3 $4 $5 $6 $7 $8 $9
}
raw 314:*:{
  haltdef
  echo -a $timestamp 14¯°--------------------------------------------------------------------------------•  
  echo -a $timestamp 14|---› 14Nick:0 $2
  echo -a $timestamp 14|---› 14FullName:0 $6-
  echo -a $timestamp 14|---› 14Ident@Ip:0 $3 $+ 14 $+ @ $+ 0 $+ $4
  var %clone = $kanalclone($2)
  if (%clone == $null)   echo -a $timestamp 14|---› 14Clones:0  (No Clone)
  else   echo -a $timestamp 14|---› 14Clone:0 ( $+ $numtok(%clone,44) $+ ) user 04/0 %clone
  haltdef
}
raw 317:*:{
  haltdef
  echo -a $timestamp 14|---› 14Connect Time:0 $asctime($4,dddd dd04/00mm04/00yyyy HH04:00nn04:00ss) 04/0 $duration($calc($ctime - $4))
  echo -a $timestamp 14|---› 14Idle:0  $duration($3)
}
raw 319:*:{
  haltdef
  echo -a $timestamp 14|---› 14Channels:0 $3-
  echo -a $timestamp 14|---› 14Com Channels:0 $ortak_k($2) 04/0 Total:04 $comchan($2,0) 0Chan(s)
}
raw 338:*:{
  haltdef
  echo -a $timestamp 14|---› 14Real Ip:0 $4 $5 $6
}
raw 320:*:{
  haltdef
  echo -a $timestamp 14|---› 14Swhois:0 $2-
}
raw 307:*: {
  haltdef 
  echo -a $timestamp 14|---› 11[14Registrato11]0 Si     
}
raw 330:*: echo -a $timestamp 14|---› 14NickServ:0 $2  $4 $5 $6 $7 $3 | halt
raw 378:*:{
  haltdef
  echo -a $timestamp 14|---› 14Real Ip:0 $3 $4 $5 $6 $7
}
raw 379:*:{
  haltdef
  echo -a $timestamp 14|---› 14Modes:0 $6
}
raw 671:*:{
  haltdef
  echo -a $timestamp 14|---› 14Connection:0 $3-
}
raw 276:*:{
  haltdef
  echo -a $timestamp 14|---› 14Client :0 $3 $4 $5 $6 $7
}
raw 327:* {
  echo -a $timestamp 14|---› 14Client Info:0 Java User
  halt
}
raw 301:*: {
  haltdef
  echo -a $timestamp 14|---› 14Away:0 ( $+ $3- $+ ) 
}
raw 310:*: {
  haltdef
  echo -a $timestamp 14|---› 14Ircop:0 $3 $4 $5 $6  
}
raw 335:*: { 
  echo -a $timestamp 14|---›  14Bot:0 Yes (+B).  
  halt
}
alias kanalclone {
  if ($ial($address($1,2),0) == 1) return
  var %nickler = 0 | var %clone = $1
  while (%nickler < $ial($address($1,2),0)) { inc %nickler | var %clone = $addtok(%clone,$ial($address($1,2),%nickler).nick, 44) }
  return %clone
}

alias ortak_k {
  if ($server == $null) {   echo -a $timestamp 14|---› 14No such server. }
  elseif ($chan($me) == 0) {   echo -a $timestamp 14|---› 14No such channel. }
  elseif (!$1) {   echo -a $timestamp 14|---› 14No such nick. }
  elseif ($comchan($1,0) == 0) {   echo -a $timestamp 14|---› 14No such nick/channel. }
  else {
    var %oid 1
    set %orka $comchan($1,0)
    unset %knms
    while (%oid <= %orka) {
      set %knms $comchan($1,%oid) $+ $chr(32) $+ %knms
      inc %oid
    }
    return %knms
  }
}

However I noticed a small problem that I can't solve: when I run a whois, I get the complete whois result in the active window, except for two entries.
In the status window these two pieces of information appear:

Nick * * is connected via the webircgateway WebIRC gateway
Nick DE set by is connecting from Germany

How can I make these two entries appear in the active window, like all the other whois entries, instead of in the status...?

2

Попробуйте выполнить следующие действия:

  • Добавьте в самый низ вашего кода новую строку: [c=#333]raw *:*: echo 4 $numeric : $1- | echo 2 $str(-,50)[/c]

  • Выполните проверку "Whois" для ника с помощью вашего скрипта.

  • Перейдите в статус окно "Status Window" и посмотрите, какие строки выделенные красным цветом отобразились в этом окне.

  • Создайте в вашем коде дополнительные обработчики RAW событий с соответствующими цифрами, которые вы получили в статус окне возле каждой строки.

  • Закомментируйте символом [c=red];[/c] или удалите строку из первого пункта.

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

[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="https://forumstatic.ru/files/000d/c9/8c/34681.jpg"></td><td><a href="https://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

Ok thanks, I solved the problem of the entries appearing in the status window. Now, having created the new raws, they all appear in the active window. However, a new problem arose:

The raw files that came out, inserting the line of code you suggested, had the numbers 318, 344 and 350.

As for the raw 318, no problem since it's for the end of the whois. I added this and solved it:

Код:
raw 318:*:{
  haltdef
  echo -a $timestamp 14|---› [End of Whois]
}

But as for the other two raws I don't know what to create. I looked for the other whois and all the raw entries, but I didn't see numbers 344 and 350 anywhere.

The only thing I know, seeing the line you made me add, is that the raw 344 is the one that concerns the country "Nick DE set by is connecting from Germany"

While the raw 350 gave the other message "Nick * * is connected via the webircgateway WebIRC gateway"

What should be the codes for these two raws?

4

Ок. Добавьте в ваш код этот фрагмент кода:

Код:
raw 344:*:{
  haltdef
  echo -a $timestamp 14|---› 14Country:0 $2-
}
raw 350:*:{
  haltdef
  echo -a $timestamp 14|---› 14Webgate:0 $4-
}
raw 318:*:{
  haltdef
  echo -a $timestamp $+(02,$str(-,50),)
}
Подпись автора

[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="https://forumstatic.ru/files/000d/c9/8c/34681.jpg"></td><td><a href="https://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

Added and everything works perfectly, finally. It was really annoying before.

Thanks so much Epic, problem solved!