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

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

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



My Events Manager

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

1

Hello,

Please go through the snippet i have which i often use.

Код:
on *:NOTICE:*:*: {
  if ($window(Notice)) && ($nick != $me)  {
    /window -k0 @Notice 
    //aline -n @Notice 10 $+[,$time,] 10[NOTICE] 14 $chan 4 $nick noticed you saying:12 
  } 
  elseif ($nick != $me) {
    /window -k0 @Notice 
    //aline -n @Notice 10 $+[,$time,] 10[NOTICE] 14 $chan 4 $nick noticed you saying:12 $1-
  }
}

on 1:BAN:#:{
  if ($me isin $nick) { Halt }
  /window -k0 @Kicks/Bans
  /aline -n @Kicks/Bans 10 $+[,$time,] 10 10[BAN]14 $chan 4 $nick set mode12 $1- 
}
on 1:KICK:#:{
  if ($me isin $nick) { Halt }
  /window -k0 @Kicks/Bans
  /aline -n @Kicks/Bans 10 $+[,$time,] 4[KICK]14 $chan 4 $nick kicked $knick 12: $1-
}
on 1:VOICE:#:{
  if ($me isin $nick) { Halt }
  /window -k0 @Channels
  /aline -n @Channels 10 $+[,$time,] 10[VOICE]14 $chan 4 $nick 7voiced12 $vnick
}
on 1:DEVOICE:#:{
  if ($me isin $nick) { Halt }
  /window -k0 @Channels
  /aline -n @Channels 10 $+[,$time,] 10[Devoice]14 $chan 4 $nick 7devoiced12 $vnick
}
on 1:HELP:#:{
  if ($me isin $nick) { Halt }
  /window -k0 @Channels
  /aline -n @Channels 10 $+[,$time,] 10[HALFOP]14 $chan 4 $nick 7halfoped12 $hnick
}
on 1:DEHELP:#:{
  if ($me isin $nick) { Halt }
  /window -k0 @Channels
  /aline -n @Channels 10 $+[,$time,] 10[DEHALFOP]14 $chan 4 $nick 7Dehalfoped12 $hnick
}
on 1:OP:#:{
  if ($me isin $nick) { Halt }
  /window -k0 @Channels
  /aline -n @Channels 10 $+[,$time,] 10[OP]14 $chan 4 $nick 7oped12 $opnick
}
on 1:DEOP:#:{
  if ($me isin $nick) { Halt }
  /window -k0 @Channels
  /aline -n @Channels 10 $+[,$time,] 10[DEOP]14 $chan 4 $nick 7deoped12 $opnick
}
on 1:JOIN:#:{
  if ($me isin $nick) { Halt }
  /window -k0 @Join/Part/Quit
  /aline -np @Join/Part/Quit 1 $+[,$time,] 44[Join]27 $chan 4 $nick 1 [ $wildsite ] 
}
on 1:PART:#:{
  if ($me isin $nick) { Halt }
  /window -k0 @Join/Part/Quit
  /aline -n @Join/Part/Quit 1 $+[,$time,] 48[Part]27 $chan 4 $nick 1 [ $wildsite ] 
}
;ON *:QUIT: {
;if ($me isin $nick) { Halt }
;/window -k0 @Join/Part/Quit
;/aline -n @Join/Part/Quit 1 $+[,$time,] 4[Quit]14 4 $nick 1 [ $wildsite ] 
;}

###HL

on *:TEXT:*:#:$highcheck($1-)
on *:ACTION:*:#:$highcheck($1-)
alias -l highcheck {
  if ($regex($1-,/\Q $+ $me $+ \E/iS)) {
    /window -k0 @Highlights
    /aline -n @Highlights 10 $+[,$time,] 10[Highlight] 14 $chan 4 $nick Highlighted you 12: $1-
  }
}

on *:Join:#: {
  var %host_to_search_for = $address($nick,2)
  var %number_from_that_host = $ialchan(%host_to_search_for,$chan,0)
  if (%number_from_that_host > 1) {
    ;we have clones!
    ;first set up our vars and loop
    var %count = 0
    unset %clones
    :loop
    inc %count
    ;loop through every nick, adding the nicks to %clones
    var %clones = %clones $ialchan(%host_to_search_for,$chan,%count).nick
    if (%count < %number_from_that_host) { goto loop }
    /window -k0 @Clones
    //aline -n @Clones 10 $+[,$time,] 10[CLONES] 14 $chan 7-Clones Detected- 124 %count 7Clones From 12 $address($nick,2)
    //aline -n @Clones 10 $+[,$time,] 10[CLONES-Nicks] 14 $chan : 12 %clones
  }
}

I have hide join, part & quit events into a separate window just so i wouldnt see it on the mains but in a different window. It helps me in ignoring abusive nicks but still can get it logged whenever i wish to add them into a blacklist.

any modification or changes for betterment of this code is welcome.

Thanks

2

1278,362 написал(а):

any modification or changes for betterment of this code is welcome.

Ок. Из-за множества ошибок в вашем коде я решил переделать его и создать собственную версию скрипта.

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

Код:
#####################################################################
#   Название: Events Manager v1.0
#   Автор: Epic (http://epicnet.ru, irc.epicnet.ru:6667 #Code)
#   Описание: Отображает в разных окнах действия на соответствующие события.
#####################################################################

on *:JOIN:#:{
  if ($me == $nick) { halt } | if (!$window(@Join/Part/Quit)) .window -nk0 @Join/Part/Quit $mircexe 21
  .aline -hnp @Join/Part/Quit $+(10[,$time,]) 03[JOIN]14 $chan 15->07 $nick $+(12,$wildsite)
}
on *:PART:#:{
  if ($me == $nick) { halt } | if (!$window(@Join/Part/Quit)) .window -nk0 @Join/Part/Quit $mircexe 21
  .aline -hnp @Join/Part/Quit $+(10[,$time,]) 05[PART]14 $chan 15->07 $nick $+(12,$wildsite) 
}
on *:QUIT:{
  if ($me == $nick) { halt } | if (!$window(@Join/Part/Quit)) .window -nk0 @Join/Part/Quit $mircexe 21
  .aline -hnp @Join/Part/Quit $+(10[,$time,]) 02[QUIT] 15->07 $nick $+(12,$wildsite) 
}
on *:NICK:{
  if ($me == $nick) { halt } | if (!$window(@Nicks)) .window -nk0 @Nicks $mircexe 21
  .aline -hnp @Nicks $+(10[,$time,]) 10[NICK] 15->07 $nick 14changed to12 $newnick
}
---------------------------------------------------------------------
on *:KICK:#:{
  if ($me == $nick) { halt } | if (!$window(@Kicks/Bans)) .window -nk0 @Kicks/Bans $mircexe 21
  .aline -hnp @Kicks/Bans $+(10[,$time,]) 04[KICK]14 $chan 15->07 $nick 14kicked04 $knick 14:12 $1-
}
on *:BAN:#:{
  if ($me == $nick) { halt } | if (!$window(@Kicks/Bans)) .window -nk0 @Kicks/Bans $mircexe 21
  .aline -hnp @Kicks/Bans $+(10[,$time,]) 10[BAN]14 $chan 15->07 $nick 14set mode:04 $1- 
}
---------------------------------------------------------------------
on *:VOICE:#:{
  if ($me == $nick) { halt } | if (!$window(@Modes)) .window -nk0 @Modes $mircexe 21
  .aline -hnp @Modes $+(10[,$time,]) 10[VOICE]14 $chan 15->07 $nick 14voiced12 $chr(43) $vnick
}
on *:DEVOICE:#:{
  if ($me == $nick) { halt } | if (!$window(@Modes)) .window -nk0 @Modes $mircexe 21
  .aline -hnp @Modes $+(10[,$time,]) 10[DEVOICE]14 $chan 15->07 $nick 14devoiced12 $vnick
}
on *:HELP:#:{
  if ($me == $nick) { halt } | if (!$window(@Modes)) .window -nk0 @Modes $mircexe 21
  .aline -hnp @Modes $+(10[,$time,]) 10[HALFOP]14 $chan 15->07 $nick 14halfoped12 $chr(37) $hnick
}
on *:DEHELP:#:{
  if ($me == $nick) { halt } | if (!$window(@Modes)) .window -nk0 @Modes $mircexe 21
  .aline -hnp @Modes $+(10[,$time,]) 10[DEHALFOP]14 $chan 15->07 $nick 14dehalfoped12 $hnick
}
on *:OP:#:{
  if ($me == $nick) { halt } | if (!$window(@Modes)) .window -nk0 @Modes $mircexe 21
  .aline -hnp @Modes $+(10[,$time,]) 10[OP]14 $chan 15->07 $nick 14oped12 $chr(64) $opnick
}
on *:DEOP:#:{
  if ($me == $nick) { halt } | if (!$window(@Modes)) .window -nk0 @Modes $mircexe 21
  .aline -hnp @Modes $+(10[,$time,]) 10[DEOP]14 $chan 15->07 $nick 14deoped12 $opnick
}
---------------------------------------------------------------------
on *:NOTICE:*:*:{
  if ($me == $nick) { halt } | if (!$window(@Notices)) .window -nk0 @Notices $mircexe 21
  if (!$istok(BotNick NickServ ChanServ BotServ MemoServ HostServ OperServ,$nick,32)) {
    .aline -hnp @Notices $+(10[,$time,]) 10[NOTICE] 15->07 $+($nick,$chan) 12: $1-
  }
  ;else .aline -hnp @Notices $+(10[,$time,]) 10[SERVICE] 15->07 $nick 05: $1-
}
on *:SNOTICE:*:{
  if (!$window(@Notices)) .window -nk0 @Notices $mircexe 21
  .aline -hnp @Notices $+(10[,$time,]) 10[SERVER] 15->07 $nick 05: $1-
}
---------------------------------------------------------------------
on *:TEXT:*:#: $highcheck($1-)
on *:ACTION:*:#: $highcheck($1-)
alias -l highcheck {
  if ($regex($1-,/\Q $+ $me $+ \E/iS)) {
    if (!$window(@ME)) .window -nk0 @ME $mircexe 21
    .aline -hnp @ME $+(10[,$time,]) 10[ME]14 $chan 15->07 $nick 12: $replace($1-,$me,$+(04,$me,12))
  }
}

И на мой взгляд некоторые фрагменты из вашего кода должны работать как отдельные скрипты. Отдельный скрипт для проверки "CLONES" и отдельный для "WHOIS".

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

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

3

Hey Epic,

This code is awesome. Sweet, simple and damn fast! the script now doesnt lag as how it use to lag before. The code beautifully alines all the @windows in proper way and displays the desired results. I agree with you when it comes to @clones & @whois and shall wait for that update. @clones & @whois helps me monitor the channel in a better way. But thats just me!

Thanks for the code and much appreciated timely help offered!

You are a master!

cheers
Sleepyhead

4

Hello Epic,

Dialog for event manager code :-

http://forumupload.ru/uploads/000d/c9/8c/362/41572.png

Event Manager dialog code :-

Код:
alias EventManager dialog -mo EventManager EventManager
dialog EventManager {
  title "Event Manager"
  size -1 -1 529 25
  option dbu
  icon G:\Y\IRC\Reg Mirc\ClownIRC_Reg\background\mirc.ico, 0
  check "@Join/Part/Quit", 1, 1 1 50 10, result left push
  check "@Nick ", 2, 54 1 50 10, result left push
  check "@Kick/Bans", 3, 107 1 50 10, result left push
  check "@Modes", 4, 160 1 50 10, left push
  check "@Notice", 5, 213 1 50 10, result left push
  check "@Highlights", 6, 266 1 50 10, result left push
  check "@Abuse/Troll", 7, 319 1 50 10, result left push
  check "@Clones", 8, 372 1 50 10, result left push
  check "@Whois", 9, 425 0 50 10, left push
  check "@JoinFlood", 10, 478 1 50 10, result left push
  check "Baduser", 11, 3 13 50 10, group result left
  check "LastJoin", 12, 113 13 50 10, group result left
  check "JoinFlood", 13, 213 13 50 10, group result left
  check "Kicklog", 14, 313 13 50 10, group result left
  button "OK", 15, 413 13 37 12, group result default multi ok
  button "Close", 16, 463 13 37 12, group result default multi cancel
}

Please suggest if you have any better design for this one.

Thanks & Regards,

Sleepyhead

Hello,

A little typo error on this line  :-

Code with typo -

Код:
check "@Whois", 9, 425 0 50 10, left push

Code correction -

Код:
check "@Whois", 9, 425 1 50 10, left push

Thanks

Sleepyhead

Отредактировано Sleepyhead (04.02.2022 08:07)