Git Product home page Git Product logo

eir's People

Contributors

bigpresh avatar edk0 avatar freeboson avatar ingmarv avatar irydacea avatar ivan-dives avatar koobs avatar mniip avatar mquin avatar nhandler avatar philantrop avatar skizzerz avatar tomaw avatar zlin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

eir's Issues

Issues when banning with special caracters

  1. I set the ban: 17:01 -!- mode/#wikimedia-ops [+b $x:Lorena_ramos_๐Ÿ’œ] by Luke081515_ (default expiry 5h for that channel)
  2. eir tried to remove it: 22:09 -!- mode/#wikimedia-ops [-bo $x:Lorena_ramos_รฐ_R\ eir] by eir (as you can see, he can't grab that special caracter) - (It seems like this removal was not successful, normally he reports every removed ban to that channel. Not this time...)

And then eir tried to remove the ban again:
22:41 -!- mode/#wikimedia-ops [+o eir] by ChanServ
22:41 -!- mode/#wikimedia-ops [-bo $x:Lorena_ramos_รฐ_R\ eir] by eir
22:52 -!- mode/#wikimedia-ops [+o eir] by ChanServ
22:52 -!- mode/#wikimedia-ops [-bo $x:Lorena_ramos_รฐ_R\ eir] by eir

Without comment here too. Then I tried to fix the situation by removing the ban manually:
22:57 -!- mode/#wikimedia-ops [-b $x:Lorena_ramos_๐Ÿ’œ] by Luke081515_
22:57 -eir:#wikimedia-ops- (REM) ban[92532] $x:Lorena_ramos_รฐ_R\ was set on #wikimedia-ops by luke081515_!~luke08151@tnb/staff/luke081515 on 2016-08-11
17:01:17Z with reason "spamming" and had an expiry date of 2016-08-11 20:01:17Z. It was removed by luke081515_!~luke08151@tnb/staff/luke081515 on
2016-08-11 20:57:47Z
As you can see, eir can't accept that ๐Ÿ’œ, so he tries to remove that ban, but can't do it, so he tries again and again...

Privilege system slows down channel joins on startup

Profiling has determined that this is due to the eir computing the bot privset for each user it sees on join.

One proposal to fix this is to defer this operation until a user attempts to interact with the bot, as this is a small subset of the users it will share channels with.

Bantracker duration parsing could be improved

Currently, if an op sets a ban duration in a format eir doesn't recognize (e.g. ~1y thinking it will be a year-long ban), this will silently assume the ban to expire in just 1 (which is assumed to be minutes by default). It'd probably be more desirable to complain to the commenting op.

The relevant code is in sub calc_time:

eir/scripts/bantracker.pl

Lines 718 to 740 in 6a267fb

sub calc_time {
# take a dircbot style time specification
# and return a time in seconds
my $spec=shift @_;
my $time=0;
while ($spec =~ /^~?(\d+)([dhmsw]?)/) {
if ($2 eq 'm') {
$time+=$1*60;
} elsif ($2 eq 'h') {
$time+=$1*3600;
} elsif ($2 eq 'd') {
$time+=$1*86400;
} elsif ($2 eq 'w') {
$time+=$1*604800;
} elsif ($2 eq 's') {
$time+=$1;
} else {
$time+=$1*60;
}
$spec=$';
}
return $time;
}

Allowing 'y' to indicate years would only be a partial solution as eir would still accept other invalid inputs. While it could be argued that those are the commenting op's problem, I feel it'd be nicer to tell them what they're doing wrong in that case.

Side note: The regex used uses a \d character class. This probably ought to be [0-9] to avoid matching Unicode digits that aren't handled as numbers by Perl, such as ูง (U+0667, ARABIC-INDIC DIGIT SEVEN). Alternatively, the /a modifier introduced in Perl 5.14 could be used.

Make btcheck an alias for btinfo

I often forget eir commands and sometimes use !btcheck (or btcheck in privmsg) to get ban index information. btcheck doesn't result in any response from eir (as expected).

Add "btcheck" as an alias of the "btinfo" command

make btcheck case-insensitive

we could change WHERE mask LIKE ? to WHERE LOWER(mask) LIKE ? and pass the query mask in lowercased, but that's not IRC casefolding. might be difficult to do this without storing a pre-casefolded mask in the database

Help is reconised as a ban comment

When giving a comment on a ban, and you type "help", eir recognises this as a comment on the ban, as well as triggering the help command.

Please comment on the following: ban[12345] !@\foo was set on ##bar by ilera!~chiyo@pdpc/supporter/active/chiyo on 2016-08-11 23:40:59Z and had an expiry date of 2016-08-14 23:40:59Z.
help
Available help topics are: help
For bantracker documentation see https://github.com/freenode/eir/blob/master/doc/bantracker/operators-guide.txt
All your bans are now commented.

Can't start ./eir

This is the output of ./eir:

Aborting due to exception:

  * /root/eir/modules/storage/json.so: undefined symbol: _ZN4Json5Value4nullE (std::exception)

btinfo should include information about configured "action" flags

btinfo currently displays:

eir: ban[index] <hostmask> was set on <#channel> by <user> on <datestamp> with reason "<reason>" and had an expiry date of <datestamp>. It is currently <status>

By default, or by using btset, ban Actions can be set (@,%,#), but these are not displayed by btinfo, or any other command that results in ban entry information being returned.

eir should include action information in returning ban entry information, based on the currently applied action of that ban. Eg:

Action: Report to <channel> (#)
Action: Unban if op (@)
Action: Attempt op and unban (%)

gmake fails on FreeBSD 10

Hi,

FreeBSD 10.1-RELEASE-p15 #0: Tue Jul 21 18:00:00 UTC 2015 [email protected]:/usr/obj/usr/src/sys/GENERIC amd64

/usr/local/bin/g++48 -v
Using built-in specs.
COLLECT_GCC=/usr/local/bin/g++48
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc48/gcc/x86_64-portbld-freebsd10.1/4.8.5/lto-wrapper
Target: x86_64-portbld-freebsd10.1
Configured with: ./../gcc-4.8.5/configure --disable-bootstrap --disable-nls --enable-gnu-indirect-function --libdir=/usr/local/lib/gcc48 --libexecdir=/usr/local/libexec/gcc48 --program-suffix=48 --with-as=/usr/local/bin/as --with-gmp=/usr/local --with-gxx-include-dir=/usr/local/lib/gcc48/include/c++/ --with-ld=/usr/local/bin/ld --with-pkgversion='FreeBSD Ports Collection' --with-system-zlib --with-ecj-jar=/usr/local/share/java/ecj-4.5.jar --enable-languages=c,c++,objc,fortran,java --prefix=/usr/local --localstatedir=/var --mandir=/usr/local/man --infodir=/usr/local/info/gcc48 --build=x86_64-portbld-freebsd10.1
Thread model: posix
gcc version 4.8.5 (FreeBSD Ports Collection)

[hro@tuovi ~/bots/eir]$ git submodule init
[hro@tuovi ~/bots/eir]$ git submodule update
[hro@tuovi ~/bots/eir]$ autoconf
[hro@tuovi ~/bots/eir]$ ./configure --prefix=/home/hro/bots/bo
checking whether to modify moduledir... no
checking whether to modify confdir... no
checking whether to modify datadir... no
checking for perl... /usr/local/bin/perl
configure: creating ./config.status
config.status: creating settings.mk
[hro@tuovi ~/bots/eir]$ gmake
warning: unknown warning option '-Wno-unused-but-set-variable'; did you mean '-Wno-unused-const-variable'? [-Wunknown-warning-option]
warning: unknown warning option '-Wno-unused-but-set-variable'; did youwarning : mean '-Wno-unused-const-variable'?warningunknown : [-Wunknown-warning-option]warning
unknownoption warning'-Wno-unused-but-set-variable'; optiondid '-Wno-unused-but-set-variable';you didmean you'-Wno-unused-const-variable'? mean[-Wunknown-warning-option] '-Wno-unused-const-variable'?
[-Wunknown-warning-option]
cp -p modules/perl/lib/init.pl build//home/hro/bots/bo/modules/perl/lib/init.pl
In file included from modules/perl/api/value_wrapper.cpp:6:
In file included from src/eir.h:4:
In file included from src/message.h:9:
In file included from src/client.h:5:
In file included from src/value.h:7:
In file included from src/exceptions.h:5:
In file included from ./paludis/util/stringify.hh:25:
In file included from /usr/include/c++/v1/sstream:174:
In file included from /usr/include/c++/v1/ostream:133:
/usr/include/c++/v1/locale:3640:35: error: too few arguments provided to function-like macro invocation
return do_open(__nm, __loc);
^
/usr/local/lib/perl5/5.20/mach/CORE/perl.h:5839:9: note: macro 'do_open' defined here

define do_open(g, n, l, a, rm, rp, sf) \

    ^

In file included from modules/perl/api/value_wrapper.cpp:6:
In file included from src/eir.h:4:
In file included from src/message.h:9:
In file included from src/client.h:5:
In file included from src/value.h:7:
In file included from src/exceptions.h:5:
In file included from ./paludis/util/stringify.hh:25:
In file included from /usr/include/c++/v1/sstream:174:
In file included from /usr/include/c++/v1/ostream:133:
/usr/include/c++/v1/locale:3653:21: error: too few arguments provided to function-like macro invocation
do_close(__c);
^
/usr/local/lib/perl5/5.20/mach/CORE/embed.h:115:9: note: macro 'do_close' defined here

define do_close(a,b) Perl_do_close(aTHX_ a,b)

    ^

In file included from modules/perl/api/value_wrapper.cpp:6:
In file included from src/eir.h:4:
In file included from src/message.h:9:
In file included from src/client.h:5:
In file included from src/value.h:7:
In file included from src/exceptions.h:5:
In file included from ./paludis/util/stringify.hh:25:
In file included from /usr/include/c++/v1/sstream:174:
In file included from /usr/include/c++/v1/ostream:133:
/usr/include/c++/v1/locale:3662:69: error: too few arguments provided to function-like macro invocation
virtual catalog do_open(const basic_string&, const locale&) const;
^
/usr/local/lib/perl5/5.20/mach/CORE/perl.h:5839:9: note: macro 'do_open' defined here

define do_open(g, n, l, a, rm, rp, sf) \

    ^

In file included from modules/perl/api/value_wrapper.cpp:6:
In file included from src/eir.h:4:
In file included from src/message.h:9:
In file included from src/client.h:5:
In file included from src/value.h:7:
In file included from src/exceptions.h:5:
In file included from ./paludis/util/stringify.hh:25:
In file included from /usr/include/c++/v1/sstream:174:
In file included from /usr/include/c++/v1/ostream:133:
/usr/include/c++/v1/locale:3665:34: error: too few arguments provided to function-like macro invocation
virtual void do_close(catalog) const;
^
/usr/local/lib/perl5/5.20/mach/CORE/embed.h:115:9: note: macro 'do_close' defined here

define do_close(a,b) Perl_do_close(aTHX_ a,b)

    ^

In file included from modules/perl/api/value_wrapper.cpp:6:
In file included from src/eir.h:4:
In file included from src/message.h:9:
In file included from src/client.h:5:
In file included from src/value.h:7:
In file included from src/exceptions.h:5:
In file included from ./paludis/util/stringify.hh:25:
In file included from /usr/include/c++/v1/sstream:174:
In file included from /usr/include/c++/v1/ostream:133:
/usr/include/c++/v1/locale:3674:72: error: too few arguments provided to function-like macro invocation
messages<_CharT>::do_open(const basic_string& __nm, const locale&) const
^
/usr/local/lib/perl5/5.20/mach/CORE/perl.h:5839:9: note: macro 'do_open' defined here

define do_open(g, n, l, a, rm, rp, sf) \

    ^

In file included from modules/perl/api/value_wrapper.cpp:6:
In file included from src/eir.h:4:
In file included from src/message.h:9:
In file included from src/client.h:5:
In file included from src/value.h:7:
In file included from src/exceptions.h:5:
In file included from ./paludis/util/stringify.hh:25:
In file included from /usr/include/c++/v1/sstream:174:
In file included from /usr/include/c++/v1/ostream:133:
/usr/include/c++/v1/locale:3711:39: error: too few arguments provided to function-like macro invocation
messages<_CharT>::do_close(catalog __c) const
^
/usr/local/lib/perl5/5.20/mach/CORE/embed.h:115:9: note: macro 'do_close' defined here

define do_close(a,b) Perl_do_close(aTHX_ a,b)

    ^

cp -p modules/perl/lib/Eir.pm build//home/hro/bots/bo/modules/perl/lib/Eir.pm
cp -p doc/eir.conf.example build//home/hro/bots/bo/etc/eir.conf.example
1 warning and 6 errors generated.
c++ -c -fPIC -Isrc -Imodules/perl -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -I/usr/local/lib/perl5/5.20/mach/CORE -Wno-unused-parameter -Wno-unused-but-set-variable -Wno-unused-variable -Wno-write-strings -Wno-format-security -DPERL_GCC_PEDANTIC -O0 -fno-inline-functions -ggdb3 -I. -pedantic -std=c++0x -DMODDIR="/home/hro/bots/bo/modules" -DETCDIR="/home/hro/bots/bo/etc" -DDATADIR="/home/hro/bots/bo/data" -fPIC -o intermediate/paludis/util/exception.o paludis/util/exception.cc
warning: unknown warning option '-Wno-unused-but-set-variable'; In file included from didmodules/perl/api/api.xs :you7 :
meanIn file included from src/eir.h'-Wno-unused-const-variable'?: 4[-Wunknown-warning-option]In file included from :
modules/perl/api/perl_helpers.cppIn file included from
:src/message.h5::
9In file included from :
src/eir.hIn file included from :src/client.h4::
5In file included from :
src/message.hIn file included from :src/value.h:97:
:
In file included from In file included from src/client.hsrc/exceptions.h::55:
:
In file included from In file included from src/value.h./paludis/util/stringify.hh::725:
:
In file included from In file included from src/exceptions.h/usr/include/c++/v1/sstream::5174:
:
In file included from In file included from ./paludis/util/stringify.hh/usr/include/c++/v1/ostream::25133:
:
In file included from /usr/include/c++/v1/sstream/usr/include/c++/v1/locale::3640174::
35In file included from :/usr/include/c++/v1/ostream :133:
error: /usr/include/c++/v1/locale:3640too: 35few: arguments providederror : to function-liketoo macrofew invocationarguments
provided return do_open(__nm, __loc);
to ^function-like
macro invocation/usr/local/lib/perl5/5.20/mach/CORE/perl.h:
5839:9 return do_open(__nm, __loc);:
^note
: macro 'do_open' defined/usr/local/lib/perl5/5.20/mach/CORE/perl.h :here5839:
9:#define do_open(g, n, l, a, rm, rp, sf)
note ^:
macro 'do_open'In file included from modules/perl/api/api.xsdefined: 7here:
In file included from
src/eir.h:4#define do_open(g, n, l, a, rm, rp, sf) :

In file included from src/message.h ^:
9:
In file included from In file included from modules/perl/api/perl_helpers.cppsrc/client.h::55:
:
In file included from In file included from src/eir.hsrc/value.h::47:
:
In file included from In file included from src/message.hsrc/exceptions.h::95:
:
In file included from In file included from src/client.h./paludis/util/stringify.hh::525:
:
In file included from In file included from src/value.h/usr/include/c++/v1/sstream::7174:
:
In file included from In file included from src/exceptions.h/usr/include/c++/v1/ostream::5133:
:
In file included from ./paludis/util/stringify.hh/usr/include/c++/v1/locale::253653:
:In file included from 21/usr/include/c++/v1/sstream:: 174:
In file included from error/usr/include/c++/v1/ostream: :133:
too /usr/include/c++/v1/localefew: 3653arguments: 21provided: to function-likeerror : macro invocationtoo
few do_close(__c);
arguments ^provided
to /usr/local/lib/perl5/5.20/mach/CORE/embed.hfunction-like: macro115 :invocation9:
do_close(__c);
note ^:
macro /usr/local/lib/perl5/5.20/mach/CORE/embed.h'do_close': 115defined: 9here:

define do_close(a,b) Perl_do_close(aTHX_ a,b)note

: ^macro
'do_close'In file included from modules/perl/api/api.xsdefined: 7here:
In file included from
src/eir.h:#define do_close(a,b) Perl_do_close(aTHX_ a,b)4
:
In file included from ^src/message.h
:9:
In file included from In file included from src/client.hmodules/perl/api/perl_helpers.cpp::55:
:
In file included from In file included from src/value.hsrc/eir.h::74:
:
In file included from In file included from src/exceptions.hsrc/message.hIn file included from ::modules/perl/api/HashWrappers.cpp59:
:
:In file included from In file included from 6./paludis/util/stringify.hhsrc/client.h:
::In file included from 255modules/perl/api/HashWrappers.h:
:
:In file included from In file included from 4/usr/include/c++/v1/sstreamsrc/value.h:
::In file included from 1747src/bot.h:
:
:In file included from In file included from 12/usr/include/c++/v1/ostreamsrc/exceptions.h:
::In file included from 1335src/client.h:
:
:In file included from 5/usr/include/c++/v1/locale./paludis/util/stringify.hh:
::In file included from 366225src/value.h::
:69In file included from 7:/usr/include/c++/v1/sstream:
In file included from :src/exceptions.h174:error:
5: In file included from :
/usr/include/c++/v1/ostreamIn file included from :./paludis/util/stringify.hhtoo133: :
25few:
/usr/include/c++/v1/localeIn file included from arguments:/usr/include/c++/v1/sstream 3662:provided:174 69:
to:In file included from /usr/include/c++/v1/ostreamfunction-like: 133macroerror:
: invocation/usr/include/c++/v1/locale:
too3640 :few35 virtual catalog do_open(const basic_string&, const locale&) const; :
arguments ^provided
errorto: /usr/local/lib/perl5/5.20/mach/CORE/perl.hfunction-like: too5839macro : few9invocation :arguments
virtual catalog do_open(const basic_string&, const locale&) const;provided
noteto: ^function-likemacro
macro'do_open' /usr/local/lib/perl5/5.20/mach/CORE/perl.hinvocationdefined: 5839
here:9
: return do_open(__nm, __loc);#define do_open(g, n, l, a, rm, rp, sf) \

                              ^        ^note

: macroIn file included from modules/perl/api/api.xs'do_open': 7defined:
In file included from heresrc/eir.h:
4#define do_open(g, n, l, a, rm, rp, sf) :

In file included from src/message.h ^:
/usr/local/lib/perl5/5.20/mach/CORE/perl.h9::
In file included from 5839In file included from modules/perl/api/perl_helpers.cpp:src/client.h:9:5:5:
:
In file included from In file included from src/eir.hsrc/value.h:note:4: :
7In file included from macro:
src/message.h In file included from :'do_open'src/exceptions.h9 ::
defined5In file included from :
src/client.hhereIn file included from :./paludis/util/stringify.hh
:525:

define do_open(g, n, l, a, rm, rp, sf) :

In file included from
In file included from src/value.h/usr/include/c++/v1/sstream: ^:7
174:
:
In file included from In file included from src/exceptions.h/usr/include/c++/v1/ostream:In file included from :5modules/perl/api/HashWrappers.cpp133:
::
In file included from 6./paludis/util/stringify.hh:
/usr/include/c++/v1/locale:In file included from :25modules/perl/api/HashWrappers.h3665:
::In file included from 434/usr/include/c++/v1/sstream:
::In file included from 174src/bot.h:
:In file included from 12error/usr/include/c++/v1/ostream:
: :In file included from 133src/client.h:
:too5 :
few/usr/include/c++/v1/localeIn file included from :src/value.h3665:arguments:7 34:
provided:In file included from src/exceptions.h :to5 error:
function-like: In file included from ./paludis/util/stringify.hh:macrotoo25 :
invocationfewIn file included from /usr/include/c++/v1/sstreamarguments:
174provided:
virtual void do_close(catalog) const; In file included from
to/usr/include/c++/v1/ostream : ^function-like133 :
macro
/usr/include/c++/v1/localeinvocation:3653
:/usr/local/lib/perl5/5.20/mach/CORE/embed.h virtual void do_close(catalog) const;21
:: 115 ^:9
error:: /usr/local/lib/perl5/5.20/mach/CORE/embed.h:toonote115 : :few9 macro:arguments provided'do_close' notetodefined: function-like macro here macro'do_close'
invocation#define do_close(a,b) Perl_do_close(aTHX_ a,b)defined

here do_close(__c); ^

define do_close(a,b) Perl_do_close(aTHX_ a,b) ^

    ^In file included from

modules/perl/api/api.xs:In file included from 7modules/perl/api/perl_helpers.cpp/usr/local/lib/perl5/5.20/mach/CORE/embed.h:
::In file included from 5115src/eir.h:
::In file included from 94src/eir.h::
: In file included from 4src/message.h:
:In file included from note9src/message.h: :
:In file included from 9macrosrc/client.h:
:In file included from 'do_close'5src/client.h :
:definedIn file included from 5 src/value.h:
here:In file included from 7src/value.h
:
:In file included from 7#define do_close(a,b) Perl_do_close(aTHX_ a,b)src/exceptions.h:

:In file included from 5src/exceptions.h ^:
:
In file included from 5./paludis/util/stringify.hh:
:In file included from 25./paludis/util/stringify.hhIn file included from :
:modules/perl/api/HashWrappers.cppIn file included from 25:/usr/include/c++/v1/sstream:
6In file included from :
:/usr/include/c++/v1/sstreamIn file included from 174:modules/perl/api/HashWrappers.h:
174:In file included from :
4/usr/include/c++/v1/ostreamIn file included from :
:/usr/include/c++/v1/ostreamIn file included from 133:src/bot.h:
133::
12/usr/include/c++/v1/locale:
:/usr/include/c++/v1/localeIn file included from 3674:src/client.h:3674:72:5:72:
:In file included from src/value.h:error7: error:
: In file included from src/exceptions.htoo: too5few :
fewIn file included from arguments ./paludis/util/stringify.hh arguments:provided 25 provided:
to In file included from to/usr/include/c++/v1/sstreamfunction-like : function-like174macro :
macroIn file included from invocation /usr/include/c++/v1/ostreaminvocation:
133
:
messages<_CharT>::do_open(const basic_string& __nm, const locale&) constmessages<_CharT>::do_open(const basic_string& __nm, const locale&) const
/usr/include/c++/v1/locale
: ^3662 ^

:69/usr/local/lib/perl5/5.20/mach/CORE/perl.h:/usr/local/lib/perl5/5.20/mach/CORE/perl.h: :58395839::9error9:: : toonote : fewnote : macroarguments macro'do_open'provided 'do_open'definedto defined function-like here heremacro

define do_open(g, n, l, a, rm, rp, sf) \invocation

define do_open(g, n, l, a, rm, rp, sf) \

    ^
    ^    virtual catalog do_open(const basic_string<char>&, const locale&) const;

In file included from modules/perl/api/perl_helpers.cpp ^:
5:
In file included from In file included from /usr/local/lib/perl5/5.20/mach/CORE/perl.hmodules/perl/api/api.xssrc/eir.h:::583974::
:
9In file included from In file included from :src/eir.hsrc/message.h ::49:
:
noteIn file included from In file included from : src/message.hsrc/client.h::macro95 :
:
'do_open'In file included from In file included from src/client.hsrc/value.hdefined:: 57here:
:
In file included from In file included from
src/value.hsrc/exceptions.h::75:
:

define do_open(g, n, l, a, rm, rp, sf) \In file included from In file included from

src/exceptions.h./paludis/util/stringify.hh:: ^525
:
:
In file included from In file included from ./paludis/util/stringify.hh/usr/include/c++/v1/sstream::25174In file included from :
:
modules/perl/api/HashWrappers.cppIn file included from In file included from :/usr/include/c++/v1/sstream/usr/include/c++/v1/ostream6:::
174133In file included from :
:
modules/perl/api/HashWrappers.hIn file included from :/usr/include/c++/v1/ostream/usr/include/c++/v1/locale4:::
1333711In file included from :
:src/bot.h39:/usr/include/c++/v1/locale:12: :
3711In file included from :src/client.h39error::: 5 :
In file included from toosrc/value.herror :: few7 :
argumentsIn file included from too src/exceptions.h provided:few 5 to:
arguments In file included from function-like./paludis/util/stringify.hhprovided : macro25to :
invocationIn file included from function-like/usr/include/c++/v1/sstream
:macromessages<_CharT>::do_close(catalog __c) const174
:
invocationIn file included from ^/usr/include/c++/v1/ostream

:133messages<_CharT>::do_close(catalog __c) const:

/usr/local/lib/perl5/5.20/mach/CORE/embed.h:/usr/include/c++/v1/locale ^115:
:36659::34/usr/local/lib/perl5/5.20/mach/CORE/embed.h :: 115note:: error9: :macro 'do_close'too definedfew noteherearguments:
providedmacro#define do_close(a,b) Perl_do_close(aTHX_ a,b)
to'do_close' ^function-likedefined
macro hereinvocation

virtual void do_close(catalog) const;#define do_close(a,b)           Perl_do_close(aTHX_ a,b)

                             ^        ^

/usr/local/lib/perl5/5.20/mach/CORE/embed.h:1151: warning9 and :6 errors generated.
note: macro 'do_close' defined here

define do_close(a,b) Perl_do_close(aTHX_ a,b)

    ^

In file included from modules/perl/api/HashWrappers.cpp:6:
In file included from modules/perl/api/HashWrappers.h:4:
In file included from src/bot.h:12:
In file included from src/client.h:5:
In file included from src/value.h:7:
In file included from src/exceptions.h:5:
In file included from ./paludis/util/stringify.hh:25:
In file included from /usr/include/c++/v1/sstream:174:
In file included from /usr/include/c++/v1/ostream:1331:
warning and /usr/include/c++/v1/locale6: error3674s: generated.
72: error: too few arguments provided to function-like macro invocation
messages<_CharT>::do_open(const basic_string& __nm, const locale&) const
^
/usr/local/lib/perl5/5.20/mach/CORE/perl.h:5839:9: note: macro 'do_open' defined here

define do_open(g, n, l, a, rm, rp, sf) \

    ^

In file included from modules/perl/api/HashWrappers.cpp:6:
In file included from modules/perl/api/HashWrappers.h:4:
In file included from src/bot.h:12:
In file included from src/client.h:5:
In file included from src/value.h:7:
In file included from src/exceptions.h:5:
In file included from ./paludis/util/stringify.hh:25:
In file included from /usr/include/c++/v1/sstream:174:
In file included from /usr/include/c++/v1/ostream:133:
/usr/include/c++/v1/locale:3711:39: error: too few arguments provided to function-like macro invocation
messages<_CharT>::do_close(catalog __c) const
^
/usr/local/lib/perl5/5.20/mach/CORE/embed.h:115:9: note: macro 'do_close' defined here

define do_close(a,b) Perl_do_close(aTHX_ a,b)

    ^

1 warning and 6 errors generated.
In file included from paludis/util/exception.cc:21:
./paludis/util/stringify.hh:95:31: error: no member named 'tr1' in namespace 'std'
struct CheckTypestd::tr1::shared_ptr<T_ >
~~~~~^
./paludis/util/stringify.hh:95:47: error: 'T_' does not refer to a value
struct CheckTypestd::tr1::shared_ptr<T_ >
^
./paludis/util/stringify.hh:94:28: note: declared here
template
^
1 warning and 2 errors generated.
gmake: *** [intermediate/paludis/util/exception.o] Error 1

Best regards,
Albert.

eir should have command to search past bans

Context

Often we quiet someone, then the quiet expires, we need to re-quiet (soon, or not soon), and we start thinking what duration to set. Was the user a problem before? If so, how many times? eir should be able to show all bans (active, and inactive ones too) matching a query.

Questions

  1. Do we need such command?
    • Yes?
  2. What should it be named?
    • Is btsearch ok?
  3. What should it search by? Possible answers for 'btsearch lamer':
    • Matches by nick - returns all bans whose mask matches lamer's currently connected mask.
    • Matches by mask - returns all bans whose mask contains the phrase 'lamer'.
    • Matches by ban comment - returns all bans whose comment contains word 'lamer'.
      • I think we should be searching them all and merge the results into one list?

Set "reason" on existing ban entry if a kick matching usermask is detected

eir currently messages the user who sets a ban on a channel requesting:

Please comment on the following: ban[XXXXX] <mask> was set on <#channel> by <user> on <date> and had an expiry date of <datestamp>.

It would be great if eir waited an $appropriate amount of time after a ban was set (say 30 seconds or so) prior to requesting a ban reason be set.

eir should use this time to wait for, look for, or detect a kick in the same channel as the ban was set in, who's kicked user hostmask also matches the previous set ban hostmask.

If this condition is met, eir should set the existing ban entry reason to the kick reason if it is set. If no reason is set, eir should do what it normally does, message the user that set the ban.

This saves manual effort / duplication / accidental entry mangling

eir interprets commands as ban annotations if btset was used in a channel

Steps to reproduce:

  1. Set a ban in a channel.
  2. Do !btset BAN_ID comment in the ops channel of the channel.
  3. Try to use some other command in a query with eir, such as btinfo.

Expected behavior: eir replies to your command as usual.

Actual behavior: eir will interpret your command as a comment for the ban.

Bantracker duration parsing doesn't handle large values well

<eir> Please comment on the following: ban[127515] nick!user@host was set on #channel by stwalkerster!~stwalkers@wikimedia/stwalkerster on 2019-10-15 09:52:35Z and had an expiry date of 2019-10-16 09:52:35Z.
<stwalkerster> ~999999999d my reason for "essentially forever" ban here.
-eir- I have suffered a terrible failure. (Perl call raised error: Died at (eval 5) line 816.

Granted, that number of nines is excessive, but a nicer error message would be appreciated, as well as morphing an expiry that long into something that is as good as effectively forever. (say, 100 years?)

Removing only two nines has given me a ban with an expiry date of 29398-11-08 09:53:44Z.

Unknown commands should return a response to user

Currently, eir does not respond to invalid/unknown commands (See #6)

For a better user experience, eir should respond to invalid/unknown commands with appropriate messaging, eg:

  • Error: Unknown command: btcheck

The method of response should be suitable for the method the command was received:

  • /notice if invoked via !command
  • /privmsg if invoked via privmsg

Newer linker fails to link libjson.so to modules/storage/json.so

Symptom:
On starting, eir would abort with exception: eir/modules/storage/json.so: undefined symbol: _ZN4Json5Value4nullE (std::exception)

With help from #eir (sorry forgot their name), found that setting shell variable LDFLAGS="-Wl,--no-as-needed" prior to compilation fixed the problem.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.