Browse Source

Merge branch 'HQ-admin-access' into next

* HQ-admin-access:
  * Add HQ as an owner when running in terminal emulation
Bryan Drewery 15 years ago
parent
commit
aff18c615e
3 changed files with 7 additions and 1 deletions
  1. 1 0
      doc/UPDATES
  2. 5 0
      src/chanprog.c
  3. 1 1
      src/main.h

+ 1 - 0
doc/UPDATES

@@ -9,6 +9,7 @@
   Compile on the oldest OS you want to support, and ensure newer ones have
   Compile on the oldest OS you want to support, and ensure newer ones have
   all necessary compat libraries.
   all necessary compat libraries.
 * Fix partyline cmds for |m and |o users who do not have console set correctly. (.adduser)
 * Fix partyline cmds for |m and |o users who do not have console set correctly. (.adduser)
+* Allow simulated terminal (HQ) user to access owners (ie, .chpass owner)
 
 
 * 'make' on BSD will now redirect to gmake.
 * 'make' on BSD will now redirect to gmake.
 
 

+ 5 - 0
src/chanprog.c

@@ -522,6 +522,11 @@ void load_internal_users()
     }
     }
   }
   }
 
 
+  // Add HQ in if needed
+  if (!backgrd && term_z) {
+    strlcat(owner, ",HQ", sizeof(owner));
+  }
+
 }
 }
 
 
 static struct userrec* add_bot_userlist(char* bot) {
 static struct userrec* add_bot_userlist(char* bot) {

+ 1 - 1
src/main.h

@@ -17,7 +17,7 @@ enum {
 extern int		role, default_flags, default_uflags, do_confedit,
 extern int		role, default_flags, default_uflags, do_confedit,
 			updating, do_restart;
 			updating, do_restart;
 extern bool		use_stderr, backgrd, used_B, term_z, loading, have_linked_to_hub, restart_was_update, restarting, safe_to_log;
 extern bool		use_stderr, backgrd, used_B, term_z, loading, have_linked_to_hub, restart_was_update, restarting, safe_to_log;
-extern char		tempdir[], *binname, owner[], version[151], ver[101], quit_msg[], *socksfile;
+extern char		tempdir[], *binname, owner[121], version[151], ver[101], quit_msg[], *socksfile;
 extern time_t		online_since, now, restart_time;
 extern time_t		online_since, now, restart_time;
 extern egg_timeval_t	egg_timeval_now;
 extern egg_timeval_t	egg_timeval_now;
 extern uid_t		myuid;
 extern uid_t		myuid;