]> jfr.im git - irc/quakenet/newserv.git/blobdiff - trusts/formats.c
O has stupid #'s.
[irc/quakenet/newserv.git] / 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;