I'm a person with zero programming skill, thus everything related to programming seems like the hardest thing.

I wanted to auto copy paste between different channels on different network using mIRC, if it matches predefined word. For example:

My predefined word is: hello

If someone in #channelA (on network1) or #channelB (on network2) or #channelC (on network3) says hello, it will appear on #channel4 (on network4) as: said "hello" without channel's name or anything and no duplicate from rest of the networks(if said hello there as well) will appear on network 4's channel, i.e only first one will appear for each keyword.

I have tried searching for a solution and found this:

But it's not helpful to me. Any guidance would be appreciated.

2

There are 2 answers

9
Orel Eraki On

Usually we never built someone a script but asks him for what he done so far and then pointing him the failures or helping him a little bit.

But because the script you mentioned sounds nice, i took the liberty of implementing it myself.

If you not familiar with mSL i suggest you to only touch the following identifiers:
FromNetwork, FromChannel, ToNetwork and ToChannel

Code

;###
;### TextPublisher v1
;### Author: Orel Eraki
;### Email: [email protected]
;###
;### Usage:
;### - Pretty simple, just edit the identifier settings.
;### - For enable/disable change "TextPublisherEnable" identifier to 1 or 0

;### Settings
alias -l TextPublisherEnable return 1
alias -l TextPublisherFormat return &timestamp < &+ &nick &+ > &1-
alias -l TextPublisherMatchText return *text*
alias -l TextPublisherFromNetwork return Network1
alias -l TextPublisherFromChannel return #Channel1
alias -l TextPublisherToNetwork return Network2
alias -l TextPublisherToChannel return #Channel2

;### Functions
alias -l FindNetworkCid {
  if ($1) {
    var %i = 1, %n = $scon(0), %temp
    while (%i <= %n) {
      if ($scon(%i).status == connected && $scon(%i).network == $1) {
        return $scon(%i).cid
      }
      inc %i
    }
  }
  return
}

;### Events
on *:text:$($TextPublisherMatchText):$($TextPublisherFromChannel): {
  if ($TextPublisherEnable && $network == $TextPublisherFromNetwork) {
    var %networkId = $FindNetworkCid($TextPublisherToNetwork)
    if (%networkId) {
      scid -t1 %networkId if ($TextPublisherToChannel ischan) { msg $TextPublisherToChannel $eval($replace($TextPublisherFormat, &, $chr(36)), 2) }
    }
  }
}
0
Xeon On

This might help, Its taken from my Nick Mention and will work with any word you want. It comes up in the room you are in highlighted and also opens a new window and records what/who and time it was said. It may lead you in the direction you are looking for if it is not exactly what you are looking for..

;; Word mention ;;

on *:START: {
  window -De @WordMention
 echo @WordMention Your word mentioned and what was said goes here
}
on *:text:*:#:{
  if (# == $active) halt
  if  (%me isin $strip($1-)) || ($me isin $strip($1-)) {
     if (%mention. [ $+ [ $nick ] ] == $true) halt
     echo -a 2,4 # $nick said : $1-
     echo @WordMention  =======================================
     echo @WordMention  0,4 $+ $timestamp  $nick said your word at $asctime(h:nn:sstt) in # 
     echo @WordMention  $nick said: $1-
     echo @WordMention  =======================================
     set -u10 %mention. [ $+ [ $nick ] ] $true
   }
}

menu channel {
  .Word mention ( $+ %mynick $+ )
  ..Set My word $iif(%me == $null,(no word set),( $+ %me $+ )):/set %me $$?="Enter word eg =     word to watch for" | echo -a %me Set
   ..$iif(%myword == on,$style(2),$style(0)) On:/set %mynick on
  ..$iif(%myword == off,$style(2),$style(0)) Off:/set %mynick off
}