mIRC Home    About    Download    Register    News    Help

Print Thread
#67761 14/01/04 03:01 AM
Joined: Jun 2003
Posts: 56
G
Babel fish
OP Offline
Babel fish
G
Joined: Jun 2003
Posts: 56
Alright so this seems kinda odd. I've seen it done in other scripts yet i can't seem to do it myself.. Heres my problem


on ^1:text:*:#: {
if ($nick isop $chan) { echo $chan 11«4@9 $+ $nick $+ 11»  $1- | haltdef }
elseif ($nick isvo $chan) { echo $chan 11«9+9 $+ $nick $+ 11»  $1- | haltdef }
elseif ($nick ishop $chan) { echo $chan 11«12%9 $+ $nick $+ 11»  $1- | haltdef }
elseif ($nick isreg $chan) { echo $chan 11«9 $+ $nick $+ 11»  $1- | haltdef }
}
That changes all the nicks to what they need to be. Depending on the server your on. We happen to be on an IRCd that uses the Half Op Status so thats what the % is if your wondering. Anywho to get on with the problem. The code above does a display like below within the mirc client.
«+Tiffy» o_O
«+Tiffy» Erm
«+Tiffy» yeah hie smile
«@Link» hehe
«@Link» hiyyaaaa tiffy
My main problem is it displays all the names like this BUT my name which continues to look like
<Vash> blah blah blah

I can't figure out what will change my text to make it look like the others. I've worked on it for a few months off and on getting tired of dealing with it. I've also looked through the help files many times and consulted some of my other scripting friends. I'm using 6.12 if anyone cares. And i know this works. Or did work at one time, i've seen it done.


- Andrew Berquist, Windfyre Network
#67762 14/01/04 03:34 AM
Joined: Apr 2003
Posts: 426
Fjord artisan
Offline
Fjord artisan
Joined: Apr 2003
Posts: 426
This is a very long code example that I've created for my own script.

It involves custom /say /msg and /amsg commands.

Code:
/say {
  ;check to see if active is a DCC, use the mIRC say command if it is
  if ((=* iswm $active) &amp;&amp; ($chat($remove($active,=)) == $remove($active,=))) {
    !say $1-
  }
  ;if active window is not dcc, check to see if $1 isn't null, if it isn't, send a raw privmsg command to active window
  else {
    if ($1- != $null) {
      raw -q PRIVMSG $active : $+ $1-
;check to see if active is a channel i'm on, and double confirm i'm on it
      if (($active ischan) &amp;&amp; ($me ison $chan)) {
;check to see if nick status for me is on (enabled in mIRC
;options), if it is, display my current status.
        if ($gettok($readini($mircini,options,n0),23,44) == 1) {
          echo $colour(own) -tmi $+ $len($timestamp) $active ( $+  $+ $colour(highlight) $+ $nick($chan,$me).pnick $+  $+ ) $1-
        }
;check to see if nick status for me is off, if it is, it just displays
;your nickname
        if ($gettok($readini($mircini,options,n0),23,44) != 1) {
          echo $colour(own) -tmi $+ $len($timestamp) $active ( $+  $+ $colour(highlight) $+ $me $+  $+ ) $1-
        }
      }
;check to see if query is the active window,
;if it is, echo to query
      if ($query($active)) {
        echo $colour(own) -tmi $+ $len($timestamp) $active ( $+  $+ $colour(highlight) $+ $me $+  $+ ) $1-
      }
    }
  }
}


/msg {
;checks to see if $1 is a DCC window, if it is, use mIRC's
;default msg command to send to DCC window
  if ((=* iswm $1) &amp;&amp; ($chat($remove($1,=)) == $remove($1,=))) {
    !msg $1-
  }
;check to see if $2 is not empty
;(this is the message, $1 is recipient of msg)
  else {
    if ($2 != $null) {
      raw -q PRIVMSG $1 : $+ $2-
;checks to see if $1 is a channel, if it is,
;and i'm on it, then it echos the message into that channel, and does the same thing that the /say command
;does to check if i have status for my nick enabled
      if (($1 ischan) &amp;&amp; ($me ison $1)) {
        if ($gettok($readini($mircini,options,n0),23,44) == 1) {
          echo $colour(own) -tqi $+ $len($timestamp) $1 ( $+  $+ $colour(highlight) $+ $nick($chan,$me).pnick $+  $+ ) $2-
        }
        if ($gettok($readini($mircini,options,n0),23,44) != 1) {
          echo $colour(own) -tqi $+ $len($timestamp) $1 ( $+  $+ $colour(highlight) $+ $me $+  $+ ) $2-
        }
      }
;checks to see if $1 is a query, if it is, echoes
;the text into the query window
      if ($1 == $query($1)) {
        echo $colour(own) -tqi $+ $len($timestamp) $query($1) ( $+  $+ $colour(highlight) $+ $me $+  $+ ) $2-
      }
;checks to see if $1 isn't an active channel
;or isn't an active query and outputs the message into the
;active window
      if (($1 !ischan) &amp;&amp; ($1 != $query($1))) {
        echo $colour(notice) -atqi $+ $len($timestamp) $str($chr(149),3) (privmsg) $+(,$chr(171),) $+(,,$1,)  $2-
      }
    }
  }
}



/amsg {
  ;sets a variable to 1 (because you're obviously in one channel if you're using amsg)
  var %i 1
  ;uses $chan(0) to return total number of channels
  ;you're on and loops through and msgs each channel,
  ;incrementing %i until %i equals number of channels you're
  ;on, and stops.
  ;it also echoes into the right channels.
  while (%i &lt;= $chan(0)) {
    .msg $chan(%i) $1-
    echo -tqmi $+ $len($timestamp) $chan(%i) ( $+  $+ $colour(highlight) $+ $nick($chan(%i),$me).pnick $+  $+ ) $1-
    inc %i
  }
}



*NOTE*
This code may not be fully complete. I've completed it to the best of my knowledge, but there may be some other mIRC events that I'm not aware of that could get broken by these commands. Use these with caution.

That said, to use them, copy and paste them into the aliases file (ALT+R, and click the Aliases Tab), save the file, and you can use them immediately.

The output is a custom format that looks like this:
[13:55:34] (@mynickname) message
(The brackets are underlined, but these forums don't support an underline tag).

You can change that how you want, just be careful editing it.
I've also used the highlight colour to seperate the your client nickname from other nicks in the channel.


I've made these because on INPUT events don't trigger for when you actually use /msg and /say (they default to the mIRC text).

Using the custom /say /msg /amsg commands do this.


--------
mIRC - fun for all the family (except grandma and grandpa)
#67763 14/01/04 03:34 AM
Joined: Dec 2002
Posts: 5
B
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
B
Joined: Dec 2002
Posts: 5
Run mIRC, then type: /help on TEXT
This will bring up the appropriate mIRC help page, scroll to the bottom of the help and read the Note.

Now, go back to mIRC, then type: /help on INPUT
This will bring up the appropriate mIRC help page which you require to do what you want to do.

Basically I think it comes to a matter of copy/pasting the on TEXT stuff and changing it to on INPUT so that it also works for yourself, but you'll have to see for yourself.

Hope this is useful to you, good luck.


Link Copied to Clipboard