Recently, its come to my attention that it gets pretty difficult to read through the mIRC #cemetech chan on relevant data. So i started designing this filter. It runs as a unique window (seperate from mIRC but still dependent) and filters off SaxJax's name and color coordinates the chat topics.

If i (komak57) msg on saxjax "hello guys", the output would normally say "[time] <SaxJax> (C) Komak57: hello guys" ... the filter would in turn output "-=time=- <*Komak57> hello guys" and color it as 'default chat text'

in the case i make a post on cemetech, it would remove the bracket formats, and color the line blue. This filter colors Quits/Joins/Enters as red-text, your own input as white-text, posts as blue-text, freebuild posts as green text... all of which are default and have yet to have customizability to them. This color scheme works best with a black background.

General Functions list:
- Keeps timers for everyones nick depending on source (saxjax get 10 minutes, regular get 1hr, and bots get 1 minute)
-> this acts as an 'activity' watch
- Filters out SaxJax name, replacing it with the name of the person responsible for saxjax input
- Color coordinates all text to make viewing simple
- automatically changes the filter's title to match the last message (toggle-able)
- Allows you to directly interact with the channel from the window
- Allows you to turn the filter on and off in case you no longer want its functionality
- other miscelaneous additions

Script: (save as Cemetech.ini under mirc root/Remotes)

Code:

on 1:LOAD: {
  set %filter on
  set %autotopic yes
  set %star *
  set %decimal .
  set %nickmarker ]
  set %commandmarker /
  set %shrtnick $me
  set %mynick $me
}

dialog msgbox {
  title        "Alert!"
  size         -1 -1 120 65
  option       dbu

  text %msgboxtext, 1, 5 5 110 50
  button "OK", 2, 35 50 50 10, ok tab 1
}

alias msgbox {
  set %msgboxtext $1-
  dialog -md msgbox msgbox
}

on 1:NICK: {
  if ($window(@CCF) != $null) { 
    set %tmr //timer $+ $nick
    %tmr off
    set %tmr //timer $+ $newnick
    %tmr 1 3600 delusr $newnick
    delusr $nick
    aline -l @CCF $newnick
    aline -p @CCF 4-= $+ $time(hh:nn:ss) $+ =- ! $nick Changed Nick to $newnick
  }
}

on *:text:*:?:{
  if ((%serv == efnet.net) || (%serv == efnet.pl)) {
    windowchk
    aline -p @CCF 13-= $+ $time(hh:nn:ss) $+ =- < $+ $nick $+ > $1-
  }
}

on *:text:*:#cemetech:{
  windowchk
  set %sendmsg false
  if ($nick == saxjax) {
    set %sax yes
    set %varify no
    if ( $right($2,1) == %nickmarker || $left($2,1) == %star || $3 == has ) { set %nick $2 | set %msg $3- | set %varify yes }
    if (( $right($3,1) == %nickmarker || $left($3,1) == %star || $4 == has ) && ( %varify == no )) { set %nick $2 $3 | set %msg $4- | set %varify yes }
    if (( $right($4,1) == %nickmarker || $left($4,1) == %star || $5 == has ) && ( %varify == no )) { set %nick $2 $3 $4 | set %msg $5- | set %varify yes }
    if (( $right($5,1) == %nickmarker || $left($5,1) == %star || $6 == has ) && ( %varify == no )) { set %nick $2 $3 $4 $5 | set %msg $6- | set %varify yes }
    if ( %varify == no ) { set %nick $2 | set %msg $3- | set %varify yes }
    if (%nick == $null) { echo @ Error, name not found! | halt }

    if ( $right(%nick,1) == %nickmarker ) {
      set %nick $right( %nick , $calc( $len( %nick )-1))
      set %nick * $+ $left( %nick , $calc( $len( %nick )-1))
    }

    set %varify no
    if ( added a post isin %msg || edited a post isin %msg ) {
      set %msgtype 12
      set %format @ %nick
      set %varify yes
      set %fcase $calc( $pos( %msg , %openbrack , 1) + 1 )
      set %lcase $pos( %msg ,], $pos( %msg , %closebrack ,0))
      set %msgpost $mid( %msg , %fcase , $calc( %lcase - %fcase ) )
      set %msglink $mid( %msg , %lcase +2 , $calc( $len( %msg ) - $calc( %lcase + 2 ) ) )
      set %found false
      if ( %shrtnick isin %nick ) {
        set %icount 1
        while ( %icount <= %wcount ) {
          if ( %msgpost == %wlist. [ $+ [ %icount ] ] ) {
            set %found true
          }
          inc %icount
        }
        if ( %found == false ) {
          inc %wcount
          set  %wlist. [ $+ [ %icount ] ] %msgpost
        }
      }

      set %icount 1
      while ( %icount <= %wcount ) {
        if ( $count( %msgpost , %wlist. [ $+ [ %icount ] ] ) > 0 ) {
          if ( %shrtnick !isin %nick ) {
            msgbox %nick $+ \n $+ %msgpost $+ \n $+ %msglink
          }
        }
        inc %icount
      }
    }
    if (( has logged isin %msg || has entered isin %msg ) && (%varify == no)) {
      set %msgtype 4
      set %format >> %nick
      set %varify yes
    }
    if ((has left isin %msg) && (%varify == no)) {
      set %msgtype 4
      set %format << %nick
      delusr %nick
      set %varify yes
    }
    if (%varify == no) {
      set %msgtype $null
      set %format < $+ %nick $+ >
      set %varify yes
      changetopic %msg
    }
    if ($1 == (T)) { set %msgtype 13 | set %format (T) }
    if ($1 != (U)) { set %sendmsg true }
  }
  if ($nick != saxjax) {
    set %sax no
    set %msgtype $null
    set %nick $nick
    delusr %nick | aline -l @CCF %nick
    set %msg $1-
    set %format < $+ %nick $+ >
    set %sendmsg true
    changetopic %msg
  }
  if ($me isin %msg || %shrtnick isin %msg) { set %msgtype 7 | set %msg $replace(%msg,$me,Fox,%shrtnick,Fox) }
  if (%watch1 isin %msg || Unreal Tournament isin %msg) { set %msgtype 9 }
  if (%sendmsg == true) { postmsg }
}

on *:QUIT: {
  if ($chan == #cemetech) {
    if ( $window(@CCF) != $null ) { 
      set %nick $nick
      set %msg %nick left the room ( $+ $1- $+ ).
      set %msgtype 4
      set %format <<
      postmsg

      set %tmr //timer $+ $encode(%nick, m)
      %tmr off
      delusr %nick
    }
  }
}
on *:JOIN: {
  if ($chan == #cemetech) {
    if ( $window(@CCF) != $null ) { 
      set %nick $nick
      set %msgtype 4
      set %format >>
      set %msg %nick has entered the room.
      postmsg
    }
  }
}

on *:input:#cemetech:{
  windowchk
  if ( $left($1,1) != / ) {
    aline -p @CCF 14-= $+ $time(hh:nn:ss) $+ =- < $+ %mynick $+ > $1-
    changetopic >.>
  }
}
on *:input:@CCF:{
  if ( $left($1,1) != / ) {
    if ($1- == \ ) {
      changetopic >.>
      halt
    }
    msg #cemetech $1-
    aline -p @CCF 14-= $+ $time(hh:nn:ss) $+ =- < $+ %mynick $+ > $1-
    changetopic >.>
    halt
  }
  if ( $left($1,1) == / ) {
    echo $1-
    $1-
    halt
  }
}
alias windowchk {
  if ($window(@CCF) == $null && %filter == on) { 
    window -l16deS @CCF popup.txt manga temple 12
    aline -l @CCF $me
  }
}
alias clrlines {
  var %i = 1
  var %lns $line(@CCF,0,1))
  while (%i <= %lns) {
    dline -l @CCF 1
    inc %i
  }
}
alias clearsax {
  if ($window(@CCF) != $null) {
    delusr *
    if (%tms > 0) { echo @CCF -=!=- Userlist Cleared }
  }
  if ($window(@CCF) == $null) {
    timerCCF off
  }
}
alias changetopic {
  if (%autotopic == yes) {
    renwin @CCF @Cem : Filter Chat
    renwin @Cem @CCF : $1-
  }
}
alias postmsg {
  if (%filter == on) {
    set %time $time(hh:nn:ss)
    if ($readini(blacklist.ini,%nick,status) == black) { echo -=!=- %nick was found in your Blacklist ( %ignorelist ) | halt }

    if (%nick != Melisma && %nick != CalcBot) {
      if (%sax == yes) set %tmr //timer $+ $encode(%nick, m) 1 600 delusr %nick
      else set %tmr //timer $+ %nick 1 3600 delusr %nick
      %tmr
    }
    if (%nick == Melisma || %nick == CalcBot) {
      if (%sax == yes) set %tmr //timer $+ $encode(%nick, m) 1 60 delusr %nick
      else set %tmr //timer $+ %nick 1 60 delusr %nick
      %tmr
    }
    aline -p @CCF %msgtype $+ -= $+ %time $+ =- %format %msg
    ;flash -r @CCF %msg
    addusr %nick
  }
}

alias blacklist {
  writeini blacklist.ini $1 status black
}
alias whitelist {
  writeini blacklist.ini $1 status white
}

alias delusr {
  var %i = 1
  var %s = 1
  var %lns $line(@CCF,0,1))
  var %tms = 0
  while (%i <= %lns) {
    set %varify no
    if ($1- == %star) { if ($1- isin $line(@CCF,%s,1)) { dline -l @CCF %s | dec %s | inc %tms | set %varify yes } }
    if (%varify == no) { if ($1- == $line(@CCF,%s,1)) { dline -l @CCF %s | dec %s | inc %tms | set %varify yes } }
    inc %s
    inc %i
  }
}
alias addusr {
  delusr %nick
  aline -l @CCF %nick
}
menu Channel {
  -
  Filter
  .Open:windowchk
  .Toggle $iif((%filter != on),On,Off):set %filter $iif((%filter != on),on,off)
  .$iif((%autotopic != on),Track,Ignore) Topic:set %autotopic $iif((%autotopic != on),on,off)
  .Settings:dialog -m filterSet filterSet
}


Still workin out the kinks of mirc's $readini and /writeini for the blacklist... this script is known to work on mIRC v5.82, but because of one of the timer methods, it may not work correctly on newer versions... this uses a variable to activate a command in the variable without using an if-then statement. Recently, the function to color-code text directed at you (containing your nick) has stopped functioning (i did some major workarounds and may have edited it out on accident).

Also, It seems i cant make the window flash on new text (which is something id like) and i cant get it to recognise when you open the window (making it active so i can reset the topic like that). Some of this script was made to work for my nick (komak57) so using your own may prove difficult and may need some kinks worked out.

update for the window's right click menus, save this file in your mirc root as popup.txt

Code:


-
Line:
.Red:aline -p @CCF 4-----------------
.Blue:aline -p @CCF 12-----------------
.White:aline -p @CCF 0-----------------
-
-----List-----:aline -p @CCF @> Any Command that alters the listbox (nicknames)
-
Blacklist
.Add:blacklist $line(@CCF,$sline(@CCF,1).ln,1)
.Remove:whitelist $line(@CCF,$sline(@CCF,1).ln,1)
Add Name:set %newusr $?="Player Name?" | if !%newusr { aline -l @CCF %newusr }
Remove:
.$iif(($sline(@CCF,1).ln != $null),$line(@CCF,$sline(@CCF,1).ln,1),Select User):if ($sline(@CCF,1).ln != $null) { dline -l @CCF $sline(@CCF,1).ln }
.Saxjax Users:clearsax
.All Users:clrlines
-
-----Other-----:aline -p @CCF @> Commands that dont fit in either window category
-
Nick
.Filter Nick:var %newnick $?="New Nickname?" | if !%newnick { set %mynick %newnick } | echo @CCF -=!=- Filter Nickname %mynick $+ . mIRC Nickname $me $+.
.mIRC Nick:var %newnick $?="New Nickname?" | if !%newnick { nick %newnick } | echo @CCF -=!=- Filter Nickname %mynick $+ . mIRC Nickname $me $+.
Topic
.Reset Topic:changetopic -= $+ $time(h:nn:ss) $+ =-
.Set Topic:var %newtopic $?="New Nickname?" | if !%newtopic { changetopic -= $+ %newtopic $+ =- }
.Toggle AutoTopic $iif(%autotopic == yes,Off,On):set %autotopic $iif(%autotopic == yes,no,yes) | echo @CCF -=!=- Topic Tracking now $iif(%autotopic == yes,On,Off)


please copy down these variables since it doesnt modify them yet:
!update: if the window doesn't run the on-load function, you may need to adjust these variables yourself. If you followed the directions though, open your mirc scripts, File > Load, then find the Cemetech script an load it ^.^


Code:

%filter on
%autotopic yes

%star *
%decimal .
%nickmarker ]
%commandmarker /
%shrtnick Komak
%mynick Fox


NOTE: the variables %shrtnick should be your shortened nickname you most likely get called.. for KermMartian, that would be Kerm. they can both be changed by right-clicking the window

%star was added to prevent conflicts in the code on ealier mirc versions, might be able to edit it out. %shrtnick is a nickname that people may call you rather than your full name. %mynick is a nickname you would like to see rather than your mirc-nick.

Keep in mind this script is not finished, but still works. Hope you enjoy, and if anyone adds some things, lemme know and ill incorporate it.
Compatibility has been confirmed on mIRC v6.35 after a few tests...

it is important to note that the variables are very vulnerable... a single 'space' can throw everything off (which seems to be the case in %filter) I'll be sure to design an on-Load function to make this automatic and reduce user-error
Very cool, Fox. I have of course seen you working through this over the past several weeks, so I'm glad you've gotten it into a releasable state. Smile I hope I was able to help to some extent.
Update
I just ignored Melisma and Saxjax. Problem solved. And don't run Windows.
the filter script doesn't ignore posts made by saxjax... It creates a simplified window, flashes it when one of the target messages was said (in this case, just your name), color codes messages, and posts cemetech messages as if the person themselves made a post.

Examples:
input:
<saxjax> (C) *TsukasaZX has entered the room.
filtered (in red):
-=12:22:50=- >> *TsukasaZX has entered the room.

input:
<saxjax> (C) *allynfolksjr edited a post in [mIRC filter script] http://tinyurl.com/4owa8p5#140755
filtered (in blue):
-=12:21:59=- @ *allynfolksjr edited a post in [mIRC filter script] http://tinyurl.com/4owa8p5#140755

Names are added by timers, so only the recently active, and still online users are in your user list.

When you post a topic or update, it adds the forum to your watch list. When someone posts after that, you get a popup notifying you there was a message. I still have to figure out what to do to allow users to remove said forum...

Ill get you pics later, after i fix up some more of the new additions
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement