Merge pull request #31 from joonicks/dev

forget fix issue #20
postfix.sh
url update
This commit is contained in:
joonicks
2025-09-22 16:48:41 +02:00
committed by GitHub
10 changed files with 29 additions and 31 deletions

1
.gitignore vendored
View File

@@ -42,3 +42,4 @@ src/y
src/z
randdata
test.conf
postfix.sh

View File

@@ -1,6 +1,6 @@
#
# EnergyMech, IRC Bot software
# Copyright (c) 1997-2018 proton
# Copyright (c) 1997-2025 proton
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -86,12 +86,14 @@ clean:
install:
$(MAKE) -C src install
test -x postfix.sh && ./postfix.sh
mega:
$(MAKE) -C src mega
mega-install:
$(MAKE) -C src mega-install
test -x postfix.sh && ./postfix.sh
#
# code validation tests

10
configure vendored
View File

@@ -1,7 +1,7 @@
#!/bin/sh
#
# EnergyMech, IRC Bot software
# Copyright (c) 1997-2018 proton
# Copyright (c) 1997-2025 proton
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -1566,10 +1566,14 @@ if [ ! "$cores" = 1 ]; then
$out "For speedy compiling, use \`\`make -j$cores''"
fi
$out ''
$out "Your chosen ./configure options have been saved to ./myconfig"
$out 'If you compile often and need to do repetitive extra operations after'
$out 'doing "make install", you can create "./postfix.sh" which will be executed'
$out 'after each "make install".'
$out ''
$out 'Your chosen ./configure options have been saved to ./myconfig'
$out 'if you wish to save ./myconfig in its current state, chmod -w ./myconfig'
$out ''
$out 'Submit your bugreports at https://github.com/MadCamel/energymech/issues'
$out 'Submit your bugreports at https://github.com/EnergyMech/energymech/issues'
$out ''
$out 'You have read the README file I hope?'
$out ''

View File

@@ -67,7 +67,7 @@ Chan *find_channel(const char *name, int anychannel)
for(chan=current->chanlist;chan;chan=chan->next)
{
if (chan->active < anychannel)
if (anychannel == 1 && chan->active == 0)
continue;
if (ni != tolowertab[(uchar)(chan->name[1])])
continue;
@@ -757,24 +757,21 @@ begin:
void do_forget(COMMAND_ARGS)
{
/*
* on_msg checks: CARGS
* on_msg checks: CAXS
*/
Chan *chan;
char *channel;
channel = chop(&rest); /* cant be NULL (CARGS) */
if ((chan = find_channel_ny(channel)) == NULL)
if (CurrentChan == NULL)
{
to_user(from,"Channel %s is not in memory",channel);
to_user(from,"Unknown channel");
return;
}
if (chan->active)
if (CurrentChan->active)
{
to_user(from,"I'm currently active on %s",channel);
to_user(from,"I'm currently active on %s",CurrentChan->name);
return;
}
to_user(from,"Channel %s is now forgotten",channel);
remove_chan(chan);
to_user(from,"Channel %s is now forgotten",CurrentChan->name);
remove_chan(CurrentChan);
}
/*

View File

@@ -228,7 +228,7 @@ LS struct
{ check_telnet, "check_telnet" },
#endif /* TELNET */
#ifdef TOYBOX
{ read_bigcharset_callback, "read_bigcharset_callback" CMD1_SE },
{ read_charset_callback, "read_charset_callback" CMD1_SE },
#endif /* TOYBOX */
#ifdef TRIVIA
{ trivia_check, "trivia_check" CMD1_SE },

View File

@@ -374,12 +374,6 @@ enum {
#define SP_NO_DNS 7
#define SP_THROTTLED 8
/* find_channel() */
#define CH_ACTIVE 0x1
#define CH_OLD 0x2
#define CH_ANY 0x3
/* check_mass() */
#define INDEX_FLOOD 0

View File

@@ -182,7 +182,7 @@ struct
* Level 70 == JOINLEVEL
*/
{ 0, "CYCLE", "do_cycle", 70 | CCPW | CAXS | ACCHAN },
{ 0, "FORGET", "do_forget", 70 | CCPW | CAXS | CARGS },
{ 0, "FORGET", "do_forget", 70 | CCPW | CAXS },
{ 0, "JOIN", "do_join", 70 | CCPW | CARGS },
{ 0, "KS", "do_kicksay", 70 | CCPW | REDIR | LBUF },
{ 0, "PART", "do_part", 70 | CCPW | CAXS | ACCHAN },

View File

@@ -688,7 +688,7 @@ LS void do_tcl(COMMAND_ARGS) __page(CMD1_SEG);
/* toybox.c */
LS int read_bigcharset_callback(char *) __page(CMD1_SEG);
LS int read_charset_callback(char *) __page(CMD1_SEG);
LS int read_bigcharset(char *) __page(CMD1_SEG);
LS int read_ascii(char *) __page(CMD1_SEG);
LS void trivia_week_toppers(void) __page(CMD1_SEG);

View File

@@ -604,8 +604,8 @@ recheck_alias:
uaccess = get_authaccess(from,to);
if (uaccess < acmd[i])
return;
CurrentChan = find_channel_ac(to);
if (mcmd[i].acchan && !CurrentChan)
CurrentChan = find_channel_ny(to);
if (mcmd[i].acchan && (CurrentChan == NULL || CurrentChan->active == 0))
{
to_user(from,ERR_CHAN,to);
return;

View File

@@ -69,7 +69,7 @@ int orig_charheight;
int orig_spacewidth;
int orig_kerning;
int read_bigcharset_callback(char *rest)
int read_charset_callback(char *rest)
{
char *opt;
int *n,sz;
@@ -98,9 +98,9 @@ int read_bigcharset_callback(char *rest)
opt = chop(&rest);
#ifdef DEBUG
debug("(read_bigcharset_callback) New character definition: %s\n",opt);
debug("(read_charset_callback) New character definition: %s\n",opt);
#endif /* DEBUG */
set_mallocdoer(read_bigcharset_callback);
set_mallocdoer(read_charset_callback);
newchar = (BigC*)Calloc(sizeof(BigC) + strlen(opt));
newchar->next = fontlist;
@@ -137,7 +137,7 @@ int read_bigcharset_callback(char *rest)
return(TRUE);
}
Free((char**)&fontname);
set_mallocdoer(read_bigcharset_callback);
set_mallocdoer(read_charset_callback);
fontname = stringdup(opt);
}
@@ -173,7 +173,7 @@ int read_bigcharset(char *fname)
charheight = 0;
kerning = 0;
readline(fd,&read_bigcharset_callback); /* readline closes fd */
readline(fd,&read_charset_callback); /* readline closes fd */
/*
* free the old font if there is one