]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/conn.c
Move client password from the Client to the Connection struct.
[ngircd-alex.git] / src / ngircd / conn.c
index 06236fd43e2ab1269e91e1065efa11786da0ed40..4900d7b803361737de363240867cfec6e001c0df 100644 (file)
@@ -918,6 +918,20 @@ va_dcl
        return ok;
 } /* Conn_WriteStr */
 
+GLOBAL const char*
+Conn_Password( CONN_ID Idx )
+{
+  assert( Idx > NONE );
+  return My_Connections[Idx].pwd;
+} /* Conn_Password */
+
+GLOBAL void
+Conn_SetPassword( CONN_ID Idx, const char *Pwd )
+{
+  assert( Idx > NONE );
+  strlcpy( My_Connections[Idx].pwd, Pwd,
+          sizeof(My_Connections[Idx].pwd) );
+} /* Conn_SetPassword */
 
 /**
  * Append Data to the outbound write buffer of a connection.