<html lang='en'>
<head>
<meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
<title>
GitLab
</title>
</meta>
</head>
<style>
  img {
    max-width: 100%;
    height: auto;
  }
  p.details {
    font-style:italic;
    color:#777
  }
  .footer p {
    font-size:small;
    color:#777
  }
  pre.commit-message {
    white-space: pre-wrap;
  }
  .file-stats a {
    text-decoration: none;
  }
  .file-stats .new-file {
    color: #090;
  }
  .file-stats .deleted-file {
    color: #B00;
  }
</style>
<body>
<div class='content'>
<h3>Justin Mitchell pushed to branch master at <a href="https://projects.sucs.org/arthur/mw">Justin Mitchell / mw</a></h3>
<h4>
Commits:
</h4>
<ul>
<li>
<strong><a href="https://projects.sucs.org/arthur/mw/commit/3fb9c8ef28732dc46d66544119b3e4063c6fb2aa">3fb9c8ef</a></strong>
<div>
<span>by Justin Mitchell</span>
<i>at 2015-10-08T11:52:13Z</i>
</div>
<pre class='commit-message'>Add replay command to mwpoll</pre>
</li>
</ul>
<h4>1 changed file:</h4>
<ul>
<li class='file-stats'>
<a href='#diff-0'>
src/webclient/comms.c
</a>
</li>
</ul>
<h4>Changes:</h4>
<li id='diff-0'>
<a href='https://projects.sucs.org/arthur/mw/commit/3fb9c8ef28732dc46d66544119b3e4063c6fb2aa#diff-0'>
<strong>
src/webclient/comms.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/src/webclient/comms.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/src/webclient/comms.c
</span><span style="color: #aaaaaa">@@ -21,6 +21,7 @@
</span> #include <special.h>
 #include <perms.h>
 #include <bb.h>
<span style="color: #000000;background-color: #ddffdd">+#include <util.h>
</span> #include "import.h"
 #include "comms.h"
 #include "mwstring.h"
<span style="color: #aaaaaa">@@ -453,6 +454,19 @@ static int handle_command(CONNECTION *co)
</span>           user->idletime = lastcomm;
                 return 1;
         }else
<span style="color: #000000;background-color: #ddffdd">+        if (co->authd && strncasecmp(buff, "replay ", 7)==0) {
+               AUTOFREE_BUFFER style=NULL;
+               AUTOFREE_BUFFER value=NULL;
+               AUTOFREE_BUFFER line = NULL;
+               char *tmpu;
+               style = remove_first_word(buff);
+               value = remove_first_word(style);
+               if ((tmpu = strchr(style, ' '))!=NULL) *tmpu=0;
+               asprintf(&line, "{\"%s\":%ld}", style, atol(value));
+                ipc_send_to_username(NULL, IPC_REPLAY, line);
+               user->idletime = lastcomm;
+                return 1;
+        }else
</span>   if (co->authd && strcasecmp(buff, "who")==0) {
                const char *line = fetch_who(0);
                if (line != NULL) 
</code></pre>

<br>
</li>

</div>
<div class='footer' style='margin-top: 10px;'>
<p>

<br>
<a href="https://projects.sucs.org/arthur/mw/commit/3fb9c8ef28732dc46d66544119b3e4063c6fb2aa">View it on GitLab</a>
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Commit","url":"https://projects.sucs.org/arthur/mw/commit/3fb9c8ef28732dc46d66544119b3e4063c6fb2aa"}}</script>
</p>
</div>
</body>
</html>