forked from github/server
Compare commits
7 Commits
Author | SHA1 | Date |
---|---|---|
Marc | 8d3b91de90 | |
Enno Rehling | 9d5b501994 | |
Enno Rehling | 209040e198 | |
Enno Rehling | 6a26ed5897 | |
Enno Rehling | f40569033d | |
Enno Rehling | c3db8a4a05 | |
Enno Rehling | 75a50345ff |
|
@ -23,6 +23,7 @@ Here's how you clone and build the source on Linux or macOS:
|
|||
git clone --recursive git://github.com/eressea/server.git source
|
||||
cd source
|
||||
git submodule update --init
|
||||
s/cmake-init
|
||||
s/build
|
||||
|
||||
If you got this far and all went well, you have built the server, and
|
||||
|
|
|
@ -4535,13 +4535,6 @@
|
|||
<arg name="command" type="order"/>
|
||||
</type>
|
||||
</message>
|
||||
<message name="error125" section="errors">
|
||||
<type>
|
||||
<arg name="unit" type="unit"/>
|
||||
<arg name="region" type="region"/>
|
||||
<arg name="command" type="order"/>
|
||||
</type>
|
||||
</message>
|
||||
<message name="error84" section="errors">
|
||||
<type>
|
||||
<arg name="unit" type="unit"/>
|
||||
|
|
|
@ -692,9 +692,6 @@ msgstr "\"$unit($unit) in $region($region): '$order($command)' - Die Einheit kan
|
|||
msgid "error85"
|
||||
msgstr "\"$unit($unit) in $region($region): '$order($command)' - Es wurde keine Emailadresse angegeben.\""
|
||||
|
||||
msgid "error125"
|
||||
msgstr "\"$unit($unit) in $region($region): '$order($command)' - Es wurde kein Banner angegeben.\""
|
||||
|
||||
msgid "starvation"
|
||||
msgstr "\"$unit($unit) verliert in $region($region) $int($dead) von $int($add($live,$dead)) Personen durch Unterernährung.\""
|
||||
|
||||
|
|
|
@ -692,9 +692,6 @@ msgstr "\"$unit($unit) in $region($region): '$order($command)' - The unit cannot
|
|||
msgid "error85"
|
||||
msgstr "\"$unit($unit) in $region($region): '$order($command)' - No email address was supplied.\""
|
||||
|
||||
msgid "error125"
|
||||
msgstr "\"$unit($unit) in $region($region): '$order($command)' - No banner text was supplied.\""
|
||||
|
||||
msgid "starvation"
|
||||
msgstr "\"$unit($unit) loses $int($dead) of $int($add($live,$dead)) people due to starvation in $region($region).\""
|
||||
|
||||
|
|
|
@ -538,7 +538,12 @@ const char *faction_getbanner(const faction * f)
|
|||
|
||||
void faction_setbanner(faction * f, const char *banner)
|
||||
{
|
||||
f->banner_id = dbstring_save(banner);
|
||||
if (banner && banner[0]) {
|
||||
f->banner_id = dbstring_save(banner);
|
||||
}
|
||||
else {
|
||||
f->banner_id = 0;
|
||||
}
|
||||
}
|
||||
|
||||
const char *faction_getpassword(const faction *f) {
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#ifndef ERESSEA_VERSION
|
||||
/* the version number, if it was not passed to make with -D */
|
||||
#define ERESSEA_VERSION "3.29.0"
|
||||
#define ERESSEA_VERSION "3.30.0"
|
||||
#endif
|
||||
|
||||
const char *eressea_version(void) {
|
||||
|
|
|
@ -2162,13 +2162,8 @@ int banner_cmd(unit * u, struct order *ord)
|
|||
|
||||
init_order(ord, NULL);
|
||||
s = getstrtoken();
|
||||
if (!s || !s[0]) {
|
||||
cmistake(u, ord, 125, MSG_EVENT);
|
||||
}
|
||||
else {
|
||||
faction_setbanner(u->faction, s);
|
||||
ADDMSG(&u->faction->msgs, msg_message("changebanner", "value", s));
|
||||
}
|
||||
faction_setbanner(u->faction, s);
|
||||
ADDMSG(&u->faction->msgs, msg_message("changebanner", "value", s));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1312,7 +1312,6 @@ static void test_banner_cmd(CuTest *tc) {
|
|||
order *ord;
|
||||
|
||||
test_setup();
|
||||
mt_create_error(125);
|
||||
mt_create_va(mt_new("changebanner", NULL), "value:string", MT_NEW_END);
|
||||
u = test_create_unit(f = test_create_faction(), test_create_region(0, 0, NULL));
|
||||
|
||||
|
@ -1325,8 +1324,8 @@ static void test_banner_cmd(CuTest *tc) {
|
|||
|
||||
ord = create_order(K_BANNER, f->locale, NULL);
|
||||
banner_cmd(u, ord);
|
||||
CuAssertStrEquals(tc, "Hodor!", faction_getbanner(f));
|
||||
CuAssertPtrNotNull(tc, test_find_messagetype(u->faction->msgs, "error125"));
|
||||
CuAssertStrEquals(tc, NULL, faction_getbanner(f));
|
||||
CuAssertPtrNotNull(tc, test_find_messagetype(u->faction->msgs, "changebanner"));
|
||||
free_order(ord);
|
||||
test_clear_messages(f);
|
||||
|
||||
|
|
Loading…
Reference in New Issue