mIRC Home    About    Download    Register    News    Help

Print Thread
O
Ollster
Ollster
O
What do i need to push notices to my phone, filtering out duplicatet messages in a certain timeframe?
Ive already wrote me a powerscript that does the actual push to pushover.
It awaits input like pushover.ps1 -sentby * -sentto * message

Can you help me

Joined: Jan 2004
Posts: 1,330
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,330
You could add the message to a hashtable and check if it exists already before pushing

Code:
alias push {
  var %key = $remove($1-,$chr(32))
  if ($hget(push,%key)) return

  hadd -mz push %key 30
  run pushover.ps1 -sentby * -sentto * $1-
}

O
Ollster
Ollster
O
im currently using this one, but its not working.
Code:
on *:NOTICE:*:*:{

  ; Igonore the Broadcast header
  if $channel === #games { HALT }

 
  /runex C:\Windows\System32\cmd.exe /c powershell.exe -ExecutionPolicy Bypass -file c:\temp\pushover.ps1 -sentby $nick -sentto $chan $1-



}

Joined: Jul 2006
Posts: 4,020
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,020
What's /runex, and $channel? It's /run and $chan unless those are custom aliases smile

Last edited by Wims; 13/05/15 07:21 PM.

#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Apr 2010
Posts: 964
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 964
Could you post the powershell code?

O
Ollster
Ollster
O
The script works fine, ive used it before to relay personal messages to my phone with an mirc script. The only thing im missing right now is the option to filter dublicated messages out. The code from above didnt work .


Link Copied to Clipboard