Compare commits

...

10 Commits

8 changed files with 111 additions and 24 deletions

View File

@ -1,6 +1,6 @@
* Changed license from GNU GPL v3 to GNU AGPL v3.
* Changed license from GNU GPL v3 to GNU AGPL v3+.
Le 08/01/2018 à 01:07, aeris a écrit :
> From: aeris <aeris@imirhil.fr>

View File

@ -6,7 +6,7 @@ Présentation de la revue hebdomadaire : https://www.april.org/revues-hebdomadai
La revue hebdo dispose d'un bot IRC qui gère les logs et la synthèse de la revue hebdo : Hebdobot.
Hebdobot est un logiciel libre sous licence GNU AGPL édité par l'April dont le projet est géré ici : https://agir.april.org/projects/hebdobot.
Hebdobot est un logiciel libre sous licence GNU AGPLv3+ édité par l'April dont le projet est géré ici : https://agir.april.org/projects/hebdobot.
Résultat de la commande !aide :
@ -35,13 +35,23 @@ Résultat de la commande !aide :
À la fin de la revue, une synthèse est accessible via un site de pastes et des statistiques de la revue sont affichées.
## Build
### Dépendances
```bash
apt install ant default-jdk
```
### Build
```bash
./build.sh
```
## License
Hebdobot is a free software released on GNU AGPL 3+
## History
TODO
Hebdobot is a free software released on GNU AGPLv3+
## Logo

View File

@ -1,3 +1,3 @@
#Build Number for ANT. Do not edit!
#Mon Apr 19 04:55:56 CEST 2021
build.number=4
#Fri Dec 31 11:53:11 CET 2021
build.number=8

View File

@ -43,6 +43,7 @@ import org.april.hebdobot.bot.hooks.Hooker;
import org.april.hebdobot.bot.hooks.IndividualSubjectHook;
import org.april.hebdobot.bot.hooks.InputReviewHook;
import org.april.hebdobot.bot.hooks.LicenseHook;
import org.april.hebdobot.bot.hooks.ListenAlexandrieHook;
import org.april.hebdobot.bot.hooks.MissingHook;
import org.april.hebdobot.bot.hooks.RecordHook;
import org.april.hebdobot.bot.hooks.StartReviewHook;
@ -143,6 +144,7 @@ public class Hebdobot extends PircBot
//
this.hooker = new Hooker();
this.hooker.add(new ListenAlexandrieHook());
this.hooker.add(new CancelPreviousInputHook());
this.hooker.add(new ChronoHook());
this.hooker.add(new CollectiveSubjectHook());

View File

@ -50,8 +50,8 @@ public class HelpHook extends Hook
if (StringsUtils.equalsAnyIgnoreCase(token, "aide", "help"))
{
result = new StringList();
result.append("!aide, !help : afficher l'aide générale");
result.append("!aide foo, !help foo : afficher l'aide de la commande foo");
result.append("!aide, !help, !aide hebdobot, !help hebdobot : afficher l'aide générale");
result.append("!aide commande, !help commande : afficher l'aide de la commande !commande");
}
else
{
@ -71,7 +71,7 @@ public class HelpHook extends Hook
{
boolean result;
if (StringUtils.equalsAnyIgnoreCase(message, "!aide", "!help"))
if (StringUtils.equalsAnyIgnoreCase(message, "!aide", "!help", "!aide hebdobot", "!help hebdobot"))
{
logger.info("!help caught.");
@ -80,16 +80,16 @@ public class HelpHook extends Hook
String.format("Bienvenue %s. Je suis %s, le robot de gestion des revues hebdomadaires de l'April.", sender, bot.getName()));
bot.sendMessage(sender, "Voici les commandes que je comprends :");
bot.sendMessage(sender, " ");
bot.sendMessage(sender, " !aide,!help : afficher cette aide");
bot.sendMessage(sender, " !aide foo : afficher l'aide de la comande foo");
bot.sendMessage(sender, " !début : commencer une nouvelle revue");
bot.sendMessage(sender, " % message  : traiter comme un commentaire");
bot.sendMessage(sender, " # titre  : démarrer un sujet individuel");
bot.sendMessage(sender, " ## titre  : démarrer un sujet collectif");
bot.sendMessage(sender, " !oups   : annuler la dernière entrée dans un point de revue");
bot.sendMessage(sender, " !courant : afficher le sujet en cours");
bot.sendMessage(sender, " !fin : terminer la revue en cours");
bot.sendMessage(sender, " !stop  : abandonner la revue en cours");
bot.sendMessage(sender, " !aide,!help : afficher cette aide");
bot.sendMessage(sender, " !aide commande : afficher l'aide de la commande !commande");
bot.sendMessage(sender, " !début : commencer une nouvelle revue");
bot.sendMessage(sender, " % message  : traiter comme un commentaire");
bot.sendMessage(sender, " # titre  : démarrer un sujet individuel");
bot.sendMessage(sender, " ## titre  : démarrer un sujet collectif");
bot.sendMessage(sender, " !oups   : annuler la dernière entrée dans un point de revue");
bot.sendMessage(sender, " !courant : afficher le sujet en cours");
bot.sendMessage(sender, " !fin : terminer la revue en cours");
bot.sendMessage(sender, " !stop  : abandonner la revue en cours");
bot.sendMessage(sender, " ");
bot.sendMessage(sender,
"Autres commandes : !anniv, !bonjour, !chrono, !date, !hello, !licence, !manquants, !merci, !record, !salut, !stats, !status, !version");

View File

@ -67,7 +67,8 @@ public class LicenseHook extends Hook
{
logger.info("!licence caught.");
bot.sendMessage("Hebdobot est un logiciel libre de l'April sous licence GNU AGPL, sources : https://forge.april.org/adminsys/hebdobot");
bot.sendMessage(
"Hebdobot est un logiciel libre de l'April sous licence GNU AGPLv3+, sources : https://forge.april.org/adminsys/hebdobot");
result = true;
}

View File

@ -0,0 +1,74 @@
/**
* Copyright (C) 2021 Christian Pierre MOMON <cmomon@april.org>
*
* This file is part of (April) Hebdobot.
*
* Hebdobot is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Hebdobot is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Hebdobot. If not, see <http://www.gnu.org/licenses/>
*/
package org.april.hebdobot.bot.hooks;
import org.apache.commons.lang3.StringUtils;
import org.april.hebdobot.HebdobotException;
import org.april.hebdobot.bot.Hebdobot;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import fr.devinsy.strings.StringList;
/**
* The Class ListenAlexandrieHook.
*
* This hook is listening Alexandrie messages and do not answer.
*
*/
public class ListenAlexandrieHook extends Hook
{
private static final Logger logger = LoggerFactory.getLogger(ListenAlexandrieHook.class);
/* (non-Javadoc)
* @see org.april.hebdobot.bot.hooks.Hook#attemptHelp(java.lang.String)
*/
@Override
public StringList attemptHelp(final String token) throws HebdobotException
{
StringList result;
result = null;
//
return result;
}
/* (non-Javadoc)
* @see org.april.hebdobot.bot.hooks.Hook#attemptProcess(org.april.hebdobot.bot.Hebdobot, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)
*/
@Override
public boolean attemptProcess(final Hebdobot bot, final String channel, final String sender, final String login, final String hostname,
final String message)
{
boolean result;
if (StringUtils.equalsIgnoreCase(sender, "alexandrie"))
{
result = true;
}
else
{
result = false;
}
//
return result;
}
}

View File

@ -220,7 +220,7 @@ public class PrivatebinClient extends PrivatebinSettings
String deleteToken = parser.get("deletetoken").toString();
String finalURL = this.serverUrl + pasteURL + "#" + Base58.encode(randomPassword.getBytes());
String deleteURL = this.serverUrl + pasteURL + "&deletetoken=" + deleteToken;
logger.info("Pastebin SUCESS");
logger.info("Pastebin SUCCESS");
logger.debug("Paste URL: {}", finalURL);
logger.debug("Delete URL: {}", deleteURL);
result = finalURL;