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

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

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



Channel info

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

1

As the name suggests, the idea is to create a script that gives various information about the channel and the users within it, from a clickable pop-up menu in the channel.

This was the start of the script:

Код:
Channel info
.Users $+ $chr(9) $+ $nick(#,0) :halt
.Channel modes $+ $chr(58) $chan($chan).mode:.
.Topic:topic $chan
.User list:/names $chan

The first addition would be to show address information in a special window.

To be more precise (taking for example these two addresses: swisscom.ch and thisaddress.us), it should show how many other similar addresses there are, if possible in real time.

Something like:

There are 432 swisscom.ch addresses

There are 150 thisaddress.us addresses

And so on with all other addresses. It doesn't need any pretty graphics or anything like that, it really just needs to say the number of those addresses, for each address. The really important thing would be real time here and nothing more.

The second addition is quite similar, it is a question of opening another special window, where this time there are the number of different nationalities of the nicks present in the channel, also here if possible in real time. Of the type:

50 connections from Switzerland

150 connections from the United States

And so on with all other nationalities.

And this was the last thing that came to my mind for now that could be useful for a script like this, I hope I explained myself well.

2

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

Для установки в mIRC нажмите комбинацию клавиш "ALT+P" и выберите "View/Channel", далее скопируйте в редактор этот код скрипта:

Код:
Channel info $chan:{
  var %win_name $+(@Channel,$chr(160),Info), %win_w 500, %win_h 300
  var %win_x $calc($window(@mdi).w /1.7 - %win_w /2), %win_y $calc($window(@mdi).dy + $window(@mdi).h /2.5 - %win_h /2)
  if ($window(%win_name)) .window -c %win_name
  .window -Bdko %win_name %win_x %win_y %win_w %win_h $mircexe 13
  .aline -p %win_name Topic:03 $chan($chan).topic
  .aline -p %win_name $chr(160)
  .aline -p %win_name Modes:03 $chan($chan).mode
  .aline -p %win_name Users:03 $nick($chan,0)
  .aline -p %win_name $chr(160)
  .editbox -f
  .hfree -w chan_hosts | .hfree -w chan_zones
  var %i 1 | while (%i <= $nick($chan,0)) {
    var %chan_host $gettok($address($nick($chan,%i),5),2,64), %chan_zone $gettok(%chan_host,$numtok(%chan_host,46),46)
    .hinc -m chan_hosts %chan_host 1
    if (%chan_zone isalpha && $len(%chan_zone) == 2) { .hinc -m chan_zones $upper(%chan_zone) 1 }
    inc %i
  }
  var %i 1 | while (%i <= $hget(chan_hosts,0).item) {
    var %chan_host $hget(chan_hosts,%i).item, %chan_host_num $hget(chan_hosts,%chan_host)
    if (%chan_host_num > 1) { .aline -p %win_name Clones:06 %chan_host =04 %chan_host_num | var %string_sep 1 }
    inc %i
  }
  if (%string_sep) .aline -p %win_name $chr(160)
  var %i 1 | while (%i <= $hget(chan_zones,0).item) {
    var %chan_zone $hget(chan_zones,%i).item, %chan_zone_num $hget(chan_zones,%chan_zone)
    .aline -p %win_name Zone:06 %chan_zone ~04 %chan_zone_num
    inc %i
  }
}
Подпись автора

[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

Thank you. I am seeing it now. It's a bit different from what I had imagined, I don't know if it's because of the problems you found, but in any case, whether it can be improved or not, I'll write what I think.

The first thing I noticed is that you brought it all together in one click, would it be possible to put the same style as before? I would like to be able to see and call up the information individually.
I like that I see some information "on sight" while others I have to click and a window opens to see them. "Users" and "Channel modes" are fine to view, "Topic" and "User list" are fine to click. Exactly like before.

While of what you created, I would like "Zone" to be clicked, as with Topic and User list, and the information opens. One problem however is the window that opens, it opens to me in the center of the screen, but I probably made a mistake in making myself understood, I meant a "window" of those that open on the left side of mirc, the one under the channels and open queries, is it possible to have that window there where that information appears? Only for the "Zone" part of course, Topic and User list are fine where they open. Also I appreciate you putting the clones in as well, but they can be removed because I already have a script that shows them, but again thanks for the thought.

The last thing always concerns "Zones", is it possible to show all the addresses of that particular country as well? For example, like this:

Zones: BE ~ 159
Zones: GR ~ 89

In short, first the general overview, exactly as you created it, and then below, in more detail, with all the addresses visible, like this::

The BE addresses are:
likethis1.be
thisaddress.be
(continue with all other addresses...)

The GR addresses are:
thisformgr.gr
(continue with all other addresses...)

And so on for all the other Zones.. In any case the "Zone" part works great, but I realized something, I tried to add the "Zone" nicks and those of the channel, and they weren't the same, there are some nicks that don't count.. ? I thought they could be net bots for example, but don't they have an address too?

4

Ок. Я изменил скрипт с учётом ваших замечаний и после уточнения дополнительных характеристик. Тест проводился на mIRC v7.73.

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

Код:
Channel info $chan
.$+(Users,$chr(58),$chr(9),$nick($chan,0)) : return
.$+(Modes,$chr(58),$chr(9),$chan($chan).mode) : return
.$+(Topic,$chr(9),➔):{
  var %win_name $+(@Topic,$chr(160),Channel) | if ($window(%win_name)) .window -c %win_name
  var %win_x $window($chan).dx, %win_y $window($chan).dy, %win_w $calc($window($chan).w -150), %win_h 100
  .window -Bdkh %win_name %win_x %win_y %win_w %win_h $mircexe 6 | .window -a %win_name | .aline -p %win_name $chan($chan).topic
}
.$+(User List,$chr(9),➔):{
  .ialfill -f $chan | var %win_name $+(@User,$chr(160),List,$chr(160),$chan)
  if ($window(%win_name)) .window -c %win_name | .window -Bk %win_name $mircexe 13
  .aline -p %win_name Channel $+(12,$chan,) user list: | .aline -p %win_name $chr(160)
  var %i 1 | while (%i <= $nick($chan,0)) {
    var %user_mask $address($nick($chan,%i),5), %user_nick $gettok(%user_mask,1,33), %user_idhost $gettok(%user_mask,2,33)
    .aline -p %win_name %i $+(06,%user_nick,) - $+(10,$replace(%user_idhost,@,@),)
    inc %i
  }
}
.$+(User Zones,$chr(9),➔):{
  .ialfill -f $chan | var %win_name $+(@User,$chr(160),Zones,$chr(160),$chan)
  if ($window(%win_name)) .window -c %win_name | .window -Bk %win_name $mircexe 21
  .aline -p %win_name Channel $+(12,$chan,) zones: | .aline -p %win_name $chr(160)
  .hfree -w user_zones | .hfree -w user_zone_hosts | var %i 1 | while (%i <= $nick($chan,0)) {
    var %user_mask $address($nick($chan,%i),5), %user_zone $gettok(%user_mask,$numtok(%user_mask,46),46)
    if (%user_zone isalpha) {
      if ($len(%user_zone) <= 4) {
        .hinc -m user_zones $upper(%user_zone) 1
        .hadd -m user_zone_hosts $upper(%user_zone) $hget(user_zone_hosts,$upper(%user_zone)) %user_mask
      }
    }
    inc %i
  }
  var %i 1 | while (%i <= $hget(user_zones,0).item) {
    var %user_zone $hget(user_zones,%i).item, %user_zone_num $hget(user_zones,%user_zone)
    .aline -p %win_name Zones:06 %user_zone ~04 %user_zone_num
    inc %i
  }
  .aline -p %win_name $str(15-,50)
  var %i 1 | while (%i <= $hget(user_zones,0).item) {
    var %user_zone $hget(user_zones,%i).item
    .aline -p %win_name The $+(07,%user_zone,) addresses are:
    var %q 1 | while (%q <= $numtok($hget(user_zone_hosts,%user_zone),32)) {
      var %user_zone_tok $gettok($hget(user_zone_hosts,%user_zone),%q,32)
      var %user_zone_nick $gettok(%user_zone_tok,1,33), %user_zone_host $gettok(%user_zone_tok,2,64)
      .aline -p %win_name $+($chr(8195),06,%user_zone_nick,) - $+(10,%user_zone_host,)
      inc %q
    }
    .aline -p %win_name $chr(160)
    inc %i
  }
}
Подпись автора

[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

The style is exactly that. "User List" is great as you made it. There is a problem with "Topic", when I click it, it opens a long window at the top, whereas before, when I clicked it from "Topic: topic $chan", it would pop out as a "message", in the active window.

There is also a problem with "User Zones", when I click it, the window opens, but inside is only this:

Channel #namechannel zones:

And in the channel window from where I clicked "User Zones" the message comes out: * /hadd: line too long (line 40, popups.ini)

6

Ок. Я внёс некоторые изменения в код с учётом ваших замечаний и устранил причину, из-за которой возникала ошибка.

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

Код:
Channel info $chan
.$+(Users,$chr(58),$chr(9),$nick($chan,0)) : return
.$+(Modes,$chr(58),$chr(9),$chan($chan).mode) : return
.$+(Topic,$chr(9),➔): echo -a Topic $+($chan,:) $chan($chan).topic
.$+(User List,$chr(9),➔):{
  .ialfill -f $chan | var %win_name $+(@User,$chr(160),List,$chr(160),$chan)
  if ($window(%win_name)) .window -c %win_name | .window -Bk %win_name $mircexe 13
  .aline -p %win_name Channel $+(12,$chan,) user list: | .aline -p %win_name $chr(160)
  var %i 1 | while (%i <= $nick($chan,0)) {
    var %user_mask $address($nick($chan,%i),5), %user_nick $gettok(%user_mask,1,33), %user_idhost $gettok(%user_mask,2,33)
    .aline -p %win_name %i $+(06,%user_nick,) - $+(10,$replace(%user_idhost,@,@),)
    inc %i
  }
}
.$+(User Zones,$chr(9),➔):{
  .ialfill -f $chan | var %win_name $+(@User,$chr(160),Zones,$chr(160),$chan)
  if ($window(%win_name)) .window -c %win_name | .window -Bk %win_name $mircexe 52
  .aline -p %win_name Channel $+(12,$chan,) zones: | .aline -p %win_name $chr(160)
  .hfree -w user_zones | .hfree -w user_zone_hosts | var %i 1 | while (%i <= $nick($chan,0)) {
    var %user_mask $address($nick($chan,%i),5), %user_zone $upper($gettok(%user_mask,$numtok(%user_mask,46),46))
    if (%user_zone isalpha && $len(%user_zone) <= 4) {
      .hinc -m user_zones %user_zone 1 | .write -i $+(user_zones_,%user_zone) %user_mask
    }
    inc %i
  }
  var %i 1 | while (%i <= $hget(user_zones,0).item) {
    var %user_zone $hget(user_zones,%i).item, %user_zone_num $hget(user_zones,%user_zone)
    .aline -p %win_name Zones:06 %user_zone ~04 %user_zone_num
    inc %i
  }
  .aline -p %win_name $str(15-,50)
  var %i 1 | while (%i <= $hget(user_zones,0).item) {
    var %user_zone $hget(user_zones,%i).item
    .aline -p %win_name The $+(07,%user_zone,) addresses are:
    var %file_zone_hosts $+(user_zones_,%user_zone) | var %q 1 | while (%q <= $lines(%file_zone_hosts)) {
      var %user_zone_str $read(%file_zone_hosts,%q)
      var %user_zone_nick $gettok(%user_zone_str,1,33), %user_zone_host $gettok(%user_zone_str,2,64)
      .aline -p %win_name $+($chr(8195),06,%user_zone_nick,) - $+(10,%user_zone_host,)
      inc %q
    }
    .remove %file_zone_hosts | .aline -p %win_name $chr(160)
    inc %i
  }
}
Подпись автора

[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]

7

All problems solved and works fine thanks. As I mentioned I was looking at the forum to see if there was something that could be used for this script and improve it, and this came to my mind if you want to update it and if it can be done: - A new entry for the search under "User Zones", where you can search address information by a word.

For example, let's take this address: MyName@TheNet-0qv005.dynamic.hispeed.ch

If I look for the word "hispeed", a search starts for all the addresses that have the word "hispeed" in the address, and a window opens (always the one below the queries and channels), the list of all the addresses that contain that word and the number of those addresses.

Something like:

There are 87 addresses that contain the word "hispeed" and they are:

MyName@TheNet-0qv005.dynamic.hispeed.ch
YourName@TheNet-3df981.thishere.hispeed.ch
Rob@Bot.myaddress.hispeed.com

And so on with all other addresses. I think that would be great stuff for this script

8

1405,375 написал(а):

As I mentioned I was looking at the forum to see if there was something that could be used for this script and improve it, and this came to my mind if you want to update it and if it can be done: - A new entry for the search under "User Zones", where you can search address information by a word.

Это интересная идея, но требует больше времени для её реализации.

Хочу уточнить некоторые детали:

  • Вы хотите, чтобы поиск производился внутри открытого окна "User Zones" или где то ещё ?

  • Результаты поиска должны отображаться в новом окне или внутри окна "User Zones" ?

  • Ввод слова для поиска должен осуществляться через поле редактирования или через всплывающее меню в окне "User Zones", или где-то и как-то ещё ?


На данный момент я реализовал это более простым способом, с помощью добавления нового пункта меню в скрипте.

В качестве теста попробуйте использовать этот код скрипта:

Код:
Channel info $chan
.$+(Users,$chr(58),$chr(9),$nick($chan,0)) : return
.$+(Modes,$chr(58),$chr(9),$chan($chan).mode) : return
.-
.$+(Topic,$chr(9),➔): echo -a Topic $+($chan,:) $chan($chan).topic
.$+(User List,$chr(9),➔):{
  .ialfill -f $chan | var %win_name $+(@User,$chr(160),List,$chr(160),$chan)
  if ($window(%win_name)) .window -c %win_name | .window -Bk %win_name $mircexe 13
  .aline -p %win_name Channel $+(12,$chan,) user list. Total $+(12,$nick($chan,0),) users: | .aline -p %win_name $chr(160)
  var %i 1 | while (%i <= $nick($chan,0)) {
    var %user_mask $address($nick($chan,%i),5), %user_nick $gettok(%user_mask,1,33), %user_idhost $gettok(%user_mask,2,33)
    .aline -p %win_name %i $+(06,%user_nick,) - $+(10,$replace(%user_idhost,@,@),)
    inc %i
  }
}
.$+(User Zones,$chr(9),➔):{
  .ialfill -f $chan | var %win_name $+(@User,$chr(160),Zones,$chr(160),$chan)
  if ($window(%win_name)) .window -c %win_name | .window -Bk %win_name $mircexe 52
  .aline -p %win_name Channel $+(12,$chan,) zones: | .aline -p %win_name $chr(160)
  .hfree -w user_zones | .hfree -w user_zone_hosts | var %i 1 | while (%i <= $nick($chan,0)) {
    var %user_mask $address($nick($chan,%i),5), %user_zone $upper($gettok(%user_mask,$numtok(%user_mask,46),46))
    if (%user_zone isalpha && $len(%user_zone) <= 4) {
      .hinc -m user_zones %user_zone 1 | .write -i $+(user_zones_,%user_zone) %user_mask
    }
    inc %i
  }
  var %i 1 | while (%i <= $hget(user_zones,0).item) {
    var %user_zone $hget(user_zones,%i).item, %user_zone_num $hget(user_zones,%user_zone)
    .aline -p %win_name Zones:06 %user_zone ~04 %user_zone_num
    inc %i
  }
  .aline -p %win_name $str(15-,50)
  var %i 1 | while (%i <= $hget(user_zones,0).item) {
    var %user_zone $hget(user_zones,%i).item
    .aline -p %win_name The $+(07,%user_zone,) addresses are:
    var %file_zone_hosts $+(user_zones_,%user_zone) | var %q 1 | while (%q <= $lines(%file_zone_hosts)) {
      var %user_zone_str $read(%file_zone_hosts,%q)
      var %user_zone_nick $gettok(%user_zone_str,1,33), %user_zone_host $gettok(%user_zone_str,2,64)
      .aline -p %win_name $+($chr(8195),06,%user_zone_nick,) - $+(10,%user_zone_host,)
      inc %q
    }
    .remove %file_zone_hosts | .aline -p %win_name $chr(160)
    inc %i
  }
}
.-
.$+(Find Addresses by Word,$chr(9),➔):{
  var %text $+(Enter a word to search in addresses.,$chr(13),Example: domen.us,$chr(44) domen,$chr(44) .us), %word $?=" %text "
  if (%word) {
    .ialfill -f $chan | var %win_name $+(@Find,$chr(160),Addr,$chr(160),$chan)
    if ($window(%win_name)) .window -c %win_name | .window -Bk %win_name $mircexe 59
    .aline -p %win_name Search on the channel $+(12,$chan,) all address by part of the word. | .aline -p %win_name $chr(160)
    var %user_addr_num1 $ialchan($+(*,%word,*@*),$chan,0).addr, %user_addr_num2 $ialchan($+(*@*,%word,*),$chan,0).addr
    var %user_addr_sum $calc(%user_addr_num1 + %user_addr_num2)
    .aline -p %win_name There are $+(04,%user_addr_sum,) addresses that contain the word $+(",07,%word,,")
    .aline -p %win_name $chr(160)
    if (%user_addr_sum) {
      var %i 1, %n 1 | while (%i <= %user_addr_num1) {
        var %user_nick $ialchan($+(*,%word,*@*),$chan,%i).nick, %user_idhost $ialchan($+(*,%word,*@*),$chan,%i).addr
        .aline -p %win_name %n $+(06,%user_nick,) - $+(10,$replace(%user_idhost,@,@,%word,$+(07,%word,10)),)
        inc %i | inc %n
      }
      var %i 1 | while (%i <= %user_addr_num2) {
        var %user_nick $ialchan($+(*@*,%word,*),$chan,%i).nick, %user_idhost $ialchan($+(*@*,%word,*),$chan,%i).addr
        .aline -p %win_name %n $+(06,%user_nick,) - $+(10,$replace(%user_idhost,@,@,%word,$+(07,%word,10)),)
        inc %i | inc %n
      }
      .aline -p %win_name $chr(160)
    }
  }
}

Дайте мне знать, если что-то будет неисправно или нуждается в улучшении.

https://i.ibb.co/FWqYjt6/ih48ht4rhre.png

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

[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]

9

No, you've already done everything perfectly. Your idea was precisely what I meant, even graphically. You are really good, everything works and it came out really well. Thank you very much.

I don't know what to add at this point, as a script for channel information it's doing great, then if you or someone else has other ideas go ahead, for me it's more than fine right now.

If you don't mind I will continue to check the forum for news, for your scripts or those of other users, if I need to look for some help or contribute if I find something interesting as I noticed that there is a dedicated section.

10

Update: how about putting the possibility to see the number of nicks registered in the channel!?

When you click the option, as for "User List", it opens a window with the number of registered users and below their nicks. Since you can only see individually whether a nick is registered or not I think it might be useful