Advertisement
Guest User

Untitled

a guest
Nov 18th, 2014
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. hook Notice::notice(n: Notice::Info){
  2. if ( ACTION_RUNSCRIPT in n$actions ){
  3. local ts = fmt("%s", null n$ts ? n$ts : "");
  4. local args=fmt("\"ts=%s;;;uid=%s;;;proto=%s;;;note=%s;;;msg=%s;;;sub=%s;;;src=%s;;;dst=%s;;;p=%s;;;identifier=%s\"",ts,n$uid,n$proto,n$note,n$msg,n$sub,n$src,n$dst,n$p,n$identifier);
  5. when ( local result = Exec::run([$cmd=fmt("/usr/bin/myscript %s", args)]) ){
  6. n$msg += fmt(" ran script for %s -> %s", n$src, n$dst);
  7. }
  8. }
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement