*** VERSION 5.6.0 ***
[NeonServV5.git] / src / modules / NeonFun.mod / cmd_neonfun_4wins.c
index 2aafcb69f464d01f7dac82c6dfc1c4b0d4133fcb..47acf18a604d4f818057e281345a1332e7273089 100644 (file)
@@ -1,4 +1,4 @@
-/* cmd_neonfun_4wins.c - NeonServ v5.4
+/* cmd_neonfun_4wins.c - NeonServ v5.6
  * Copyright (C) 2011-2012  Philipp Kreil (pk910)
  * 
  * This program is free software: you can redistribute it and/or modify
@@ -71,32 +71,32 @@ CMD_BIND(neonfun_cmd_4wins) {
         game->timer = timeq_add(120, module_id, fourwins_timeout, game);
     } else {
         if(!argc) {
-            reply(getTextBot(), user, "NF_4WINS_ENTER_OPPONENT");
+            reply(textclient, user, "NF_4WINS_ENTER_OPPONENT");
             return;
         }
         struct UserNode *opp_user = getUserByNick(argv[0]);
         if(!opp_user) {
-            reply(getTextBot(), user, "NS_USER_UNKNOWN", argv[0]);
+            reply(textclient, user, "NS_USER_UNKNOWN", argv[0]);
             return;
         }
         if(opp_user == user) {
-            reply(getTextBot(), user, "NF_4WINS_SELF");
+            reply(textclient, user, "NF_4WINS_SELF");
             return;
         }
         struct ChanUser *opponent = getChanUser(opp_user, chan);
         if(!opponent) {
-            reply(getTextBot(), user, "NF_4WINS_OPPONENT_NOT_IN_CHAN", opp_user->nick);
+            reply(textclient, user, "NF_4WINS_OPPONENT_NOT_IN_CHAN", opp_user->nick);
             return;
         }
         game = calloc(1,sizeof(*game));
         game->player[0] = chanuser;
         game->player[1] = opponent;
-        game->textbot = getTextBot();
+        game->textbot = textclient;
         game->state = FOURWINS_STATE_WAITING;
         game->timer = timeq_add(120, module_id, fourwins_timeout, game);
         game->next = fourwins_active_games;
         fourwins_active_games = game;
-        reply(getTextBot(), user, "NF_4WINS_REQUESTED", opp_user->nick);
-        reply(getTextBot(), opp_user, "NF_4WINS_REQUEST", user->nick);
+        reply(textclient, user, "NF_4WINS_REQUESTED", opp_user->nick);
+        reply(textclient, opp_user, "NF_4WINS_REQUEST", user->nick);
     }
 }