diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2013-10-24 11:18:23 -0700 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2013-10-24 11:18:23 -0700 |
commit | 23aa8816357a24e480f133e7138e8ac78af757e5 (patch) | |
tree | 6fd8c540dc38de05614c57a658479b9ed779f80b /src/map/pc.cpp | |
parent | bbcdc2b68c2de6068d550b134381ed76b098dc0a (diff) | |
download | tmwa-23aa8816357a24e480f133e7138e8ac78af757e5.tar.gz tmwa-23aa8816357a24e480f133e7138e8ac78af757e5.tar.bz2 tmwa-23aa8816357a24e480f133e7138e8ac78af757e5.tar.xz tmwa-23aa8816357a24e480f133e7138e8ac78af757e5.zip |
Show MOTD after GUI is created
Diffstat (limited to 'src/map/pc.cpp')
-rw-r--r-- | src/map/pc.cpp | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/src/map/pc.cpp b/src/map/pc.cpp index 042be3c..06b7ceb 100644 --- a/src/map/pc.cpp +++ b/src/map/pc.cpp @@ -746,20 +746,6 @@ int pc_authok(int id, int login_id2, TimeT connect_until_time, PRINTF("Connection accepted: Character '%s' (account: %d).\n", sd->status.name, sd->status.account_id); - // TODO fix this to cache and use inotify - // this is far from the only such thing, but most of the others are logs - { - std::ifstream in(motd_txt.c_str()); - if (in.is_open()) - { - FString buf; - while (io::getline(in, buf)) - { - clif_displaymessage(sd->fd, buf); - } - } - } - sd->auto_ban_info.in_progress = 0; // Initialize antispam vars @@ -787,6 +773,21 @@ int pc_authok(int id, int login_id2, TimeT connect_until_time, return 0; } +// TODO fix this to cache and use inotify +// this is far from the only such thing, but most of the others are logs +void pc_show_motd(dumb_ptr<map_session_data> sd) +{ + std::ifstream in(motd_txt.c_str()); + if (in.is_open()) + { + FString buf; + while (io::getline(in, buf)) + { + clif_displaymessage(sd->fd, buf); + } + } +} + /*========================================== * session idに問題ありなので後始末 *------------------------------------------ |