mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Feb 2015
Posts: 138
kap Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Feb 2015
Posts: 138
I am using script Peace and Protection 4.22 with text theming on.

This enables group #pp-text between line 124 and 761 in script last.mrc to allow theming of text, joins, and other basic mIRC output.

Issue:
When I playback from ZNC bouncer the echo -t command in the various ON (TEXT|ACTION) etc events in this group override the znc.in/server-time[-iso] timestamp with the current time.

Suggestion:
The use of echo -tz, whereby the -z switch works with -t and specifies it should timestamp with the znc.in/server-time[-iso] value rather than the current time!

Maybe there are better ideas. But I thought it might be a missed chance to incorporate such a feature.


GNU Terry Pratchett - Looking for a mIRC help channel -> Check #mircscripting @ irc.swiftirc.net
Joined: Feb 2015
Posts: 138
kap Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Feb 2015
Posts: 138
*bump*

Maybe it's not feasible to support a -z switch for the /echo command, but a couple of other thoughts:

1] If the -z switch is specified with the -t switch it causes the timestamp to be the timestamp: $asctime($msgstamp,$timestampfmt)

2] Perhaps a new event prefix can be introduced for the various on TEXT and on ACTION etc events so that /echo -t displays the server-time or znc.in/server-time[-iso] timestamp?

3] Is it possible to write an alias echo {} myself that uses the -z switch in such a way it checks whether -t is specified and, if it is, overrides the current timestamp with: $asctime($msgstamp,$timestampfmt)

Any thoughts?

edit:

I came up with this addon for PnP, but it needs further testing: (Doesn't seem to work all that beautifully)

Code:
; #= ppbouncer -rs
; ########################################
; Peace and Protection
; Bouncer (extras addon)
; ########################################

#.ppa.info off
[addon]
name=Bouncer
group=Extras
popup=Bouncer
author=acvxqs
version=1.0
url=
email=
id=ppbouncer
ppver=4.22
[files]
1=BNC.PPA
[notes]
1=This addon adds ZNC server-time support for PnP. It appends the server-time timestamp to the end of the text.
#.ppa.info end

alias echo {
  var %numtok $numtok($1-,32)
  while (%numtok > 0) {
    var %tok $gettok($1-,%numtok,32)
    if (-* iswm %tok) {
      if ((t isincs %tok) && ($msgstamp != 0)) { var %stamp $asctime($msgstamp,$timestampfmt) }
      break
    }
    dec %numtok

  }
  if (%stamp) { !echo $1- %stamp }
  else { !echo $1- }
}


Last edited by kap; 07/07/17 05:49 PM.

GNU Terry Pratchett - Looking for a mIRC help channel -> Check #mircscripting @ irc.swiftirc.net
Joined: Feb 2015
Posts: 138
kap Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Feb 2015
Posts: 138
I figured the best way for now to get what I want is to:

1] turn off text theming (/text off)
2] connect to ZNC and playback
3] turn on text theming after playback finishes (/text on)

Cheers


GNU Terry Pratchett - Looking for a mIRC help channel -> Check #mircscripting @ irc.swiftirc.net

Link Copied to Clipboard