Kaynağa Gözat

Record features in bot's own userrec when adding itself.

Issue #87
Bryan Drewery 10 yıl önce
ebeveyn
işleme
d051e913aa
2 değiştirilmiş dosya ile 7 ekleme ve 2 silme
  1. 5 1
      src/chanprog.cc
  2. 2 1
      src/dcc.cc

+ 5 - 1
src/chanprog.cc

@@ -510,7 +510,12 @@ static struct userrec* add_bot_userlist(char* bot) {
 }
 
 void add_myself_to_userlist() {
+  char buf[15];
+
   conf.bot->u = add_bot_userlist(conf.bot->nick);
+
+  simple_snprintf(buf, sizeof(buf), "%d", ALL_FEATURE_FLAGS);
+  set_user(&USERENTRY_FFLAGS, conf.bot->u, buf);
 }
 
 void add_child_bots() {
@@ -591,7 +596,6 @@ void chanprog()
 {
   struct utsname un;
 
-
   sdprintf("I am: %s", conf.bot->nick);
 
   /* Add the 'default' virtual channel.

+ 2 - 1
src/dcc.cc

@@ -243,7 +243,8 @@ greet_new_bot(int idx)
   dcc[idx].status |= STAT_LINKING;
 
   dprintf(idx, "v 1001500 9 Wraith %s %d %d %li %s %s\n", egg_version,
-      ALL_FEATURE_FLAGS, conf.bot->localhub, (long)buildts, commit, egg_version);
+      conf.bot->u->fflags, conf.bot->localhub, (long)buildts, commit,
+      egg_version);
 
   for (int i = 0; i < dcc_total; i++) {
     if (dcc[i].type && dcc[i].type == &DCC_FORK_BOT) {