]> jfr.im git - irc/quakenet/newserv.git/commitdiff
O has stupid #'s.
authorChris Porter <redacted>
Mon, 13 Oct 2008 01:44:39 +0000 (02:44 +0100)
committerChris Porter <redacted>
Mon, 13 Oct 2008 01:44:39 +0000 (02:44 +0100)
trusts/formats.c

index aa427760a3e8bd14bb5b727e2fd136af09be8026..d35570448cd9cd8c9b58b1aa23b7f0c40e726e53 100644 (file)
@@ -132,6 +132,9 @@ int parsetg(char *buf, trustgroup *tg, int oformat) {
     return 0;
   *line++ = '\0';
 
+  if(oformat && (id[0] == '#'))
+    id++;
+
   tg->id = strtoul(id, NULL, 10);
   if(!tg->id)
     return 0;
@@ -199,6 +202,9 @@ int parseth(char *line, trusthost *th, unsigned int *tgid, int oformat) {
     return 0;
   *line++ = '\0';
 
+  if(oformat && (id[0] == '#'))
+    id++;
+
   *tgid = strtoul(id, NULL, 10);
   if(!*tgid)
     return 0;