if the userinfo field is missing. Affected file is
lib/silcclient/command_reply.c.
+ * Do not print error in silc_file_read if the read file does
+ not exist. Just silently return NULL. Affected file is
+ lib/silcutil/silcutil.c.
+
Fri Sep 7 22:16:38 EEST 2001 Pekka Riikonen <priikone@silcnet.org>
* Fixed various printing bugs on the user interface in the
that the user has. And a local command to dump the contents of the
public key to the screen. Something like LISTKEYS, SHOWKEY...
- o We should get rid of the clientconfig.[ch] in Irssi SILC and move the
- cipher, hash, hmac and pkcs configuration to the Irssi SILC's config
- file.
-
- o Resolve the users during the JOIN process with WHOIS and not with
- IDENTIFY. Otherwise the userinfo is never resolved without explicitly
- doing WHOIS to the user.
-
o The QUIT command should wait for server's disconnection (at least for
a while) before exiting the application.
o The JOIN command's HELP is generated from Irssi IRCs JOIN help and
- the syntax is not same in SILC. This must be fixed.
+ the syntax is not same in SILC. This must be fixed. Most likely
+ we must forget the Irssi's JOIN command and mimic it to get our
+ required syntax for it too.
- o With USERS command to a channel user is not joined the name of the
- channel is printed as garbled.
+ o We should get rid of the clientconfig.[ch] in Irssi SILC and move the
+ cipher, hash, hmac and pkcs configuration to the Irssi SILC's config
+ file.
o Add PERL scripting support from Irssi CVS.
char userhost[256];
server = conn == NULL ? NULL : conn->context;
+ memset(userhost, 0, sizeof(userhost));
if (sender->username)
snprintf(userhost, sizeof(userhost) - 1, "%s@%s",
sender->username, sender->hostname);
}
}
+ memset(userhost, 0, sizeof(userhost));
if (client->username)
snprintf(userhost, sizeof(userhost) - 1, "%s@%s",
client->username, client->hostname);
client = va_arg(va, SilcClientEntry);
channel = va_arg(va, SilcChannelEntry);
+ memset(userhost, 0, sizeof(userhost));
if (client->username)
snprintf(userhost, sizeof(userhost) - 1, "%s@%s",
client->username, client->hostname);
client = va_arg(va, SilcClientEntry);
message = va_arg(va, char *);
+ memset(userhost, 0, sizeof(userhost));
if (client->username)
snprintf(userhost, sizeof(userhost) - 1, "%s@%s",
client->username, client->hostname);
signal_emit("channel topic changed", 1, chanrec);
}
+ memset(userhost, 0, sizeof(userhost));
snprintf(userhost, sizeof(userhost) - 1, "%s@%s",
client->username, client->hostname);
signal_emit("message topic", 5, server, channel->channel_name,
channel_name = va_arg(va, char *);
client = va_arg(va, SilcClientEntry);
+ memset(userhost, 0, sizeof(userhost));
snprintf(userhost, sizeof(userhost) - 1, "%s@%s",
client->username, client->hostname);
signal_emit("message invite", 4, server, channel ? channel->channel_name :
oldclient, oldclient->nickname,
newclient, newclient->nickname);
+ memset(userhost, 0, sizeof(userhost));
snprintf(userhost, sizeof(userhost) - 1, "%s@%s",
newclient->username, newclient->hostname);
signal_emit("message nick", 4, server, newclient->nickname,
if (chanrec == NULL)
cmd_return_error(CMDERR_CHAN_NOT_FOUND);
+ memset(userhost, 0, sizeof(userhost));
snprintf(userhost, sizeof(userhost) - 1, "%s@%s",
server->conn->local_entry->username,
server->conn->local_entry->hostname);
/* SYNTAX: KEY MSG <nickname> set|unset|list|agreement|negotiate [<arguments>] */
/* SYNTAX: KEY CHANNEL <channel> set|unset|list|agreement|negotiate [<arguments>] */
/* SYNTAX: KICK <channel> <nickname>[@<hostname>] [<comment>] */
-/* SYNTAX: KILL <channel> <nickname>[@<hostname>] [<comment>] */
+/* SYNTAX: KILL <nickname>[@<hostname>] [<comment>] */
/* SYNTAX: OPER <username> [-pubkey] */
/* SYNTAX: SILCOPER <username> [-pubkey] */
/* SYNTAX: TOPIC <channel> [<topic>] */
silc_hash_client_id_compare, NULL,
&id_cache);
- if (!id_cache || !((SilcClientEntry)id_cache->context)->username) {
+ if (!id_cache || !((SilcClientEntry)id_cache->context)->username ||
+ !((SilcClientEntry)id_cache->context)->realname) {
/* No we don't have it (or it is incomplete in information), query
it from the server. Assemble argument table that will be sent
for the WHOIS command later. */
}
if (!filename)
- filename = " ";
-
- /* Purge the log file if the max size is defined. */
- if (maxsize) {
- fp = fopen(filename, "r");
- if (fp) {
- int filelen;
-
- filelen = fseek(fp, (off_t)0L, SEEK_END);
- fseek(fp, (off_t)0L, SEEK_SET);
-
- /* Purge? */
- if (filelen >= maxsize)
- unlink(filename);
+ fp = stderr;
- fclose(fp);
+ if (filename) {
+ /* Purge the log file if the max size is defined. */
+ if (maxsize) {
+ fp = fopen(filename, "r");
+ if (fp) {
+ int filelen;
+
+ filelen = fseek(fp, (off_t)0L, SEEK_END);
+ fseek(fp, (off_t)0L, SEEK_SET);
+
+ /* Purge? */
+ if (filelen >= maxsize)
+ unlink(filename);
+
+ fclose(fp);
+ }
+ }
+
+ /* Open the log file */
+ if ((fp = fopen(filename, "a+")) == NULL) {
+ fprintf(stderr, "warning: could not open log file "
+ "%s: %s\n", filename, strerror(errno));
+ fprintf(stderr, "warning: log messages will be displayed on "
+ "the screen\n");
+ fp = stderr;
}
}
- /* Open the log file */
- if ((fp = fopen(filename, "a+")) == NULL) {
- fprintf(stderr, "warning: could not open log file "
- "%s: %s\n", filename, strerror(errno));
- fprintf(stderr, "warning: log messages will be displayed on the screen\n");
- fp = stderr;
- }
-
/* Get the log type name */
- for(np = silc_log_types; np->name; np++) {
+ for (np = silc_log_types; np->name; np++) {
if (np->type == type)
break;
}
fd = open(filename, O_RDONLY);
if (fd < 0) {
+ if (errno == ENOENT)
+ return NULL;
SILC_LOG_ERROR(("Cannot open file %s: %s", filename, strerror(errno)));
return NULL;
}