diff options
Diffstat (limited to 'src/messages.c')
-rw-r--r-- | src/messages.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/messages.c b/src/messages.c index c9408a4ac..02f1cd899 100644 --- a/src/messages.c +++ b/src/messages.c @@ -72,6 +72,10 @@ int m_time(char *source, int ac, char **av) struct tm *tm; char buf[64]; + if (!source) { + return MOD_CONT; + } + time(&t); tm = localtime(&t); strftime(buf, sizeof(buf), "%a %b %d %H:%M:%S %Y %Z", tm); @@ -86,6 +90,10 @@ int m_motd(char *source) FILE *f; char buf[BUFSIZE]; + if (!source) { + return MOD_CONT; + } + f = fopen(MOTDFilename, "r"); anope_cmd_375(source); if (f) { |