Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // server.cpp
- // somewhere before serverslice() definition
- int nextspammsg = 0, nextspammsgmillis = 0;
- void spammessage()
- {
- if(!scl.spammsgs.length()) return;
- if(servmillis > nextspammsgmillis)
- {
- if(numclients() > 0)
- {
- if(!scl.spammsgs.inrange(nextspammsg)) nextspammsg = 0;
- sendservmsg(scl.spammsgs[nextspammsg]);
- nextspammsg++;
- }
- nextspammsgmillis = servmillis + 10000;
- }
- }
- //after if(servmillis>nextstatus) block into serverslice definition
- spammessage();
- // protos.h
- // replace vector<const char *> adminonlymaps by :
- vector<const char *> adminonlymaps, spammsgs;
- // bool checkarg()'s switch
- case 'G': spammsgs.add(a); break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement