summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
b07953b)
*Fix warnings in command_parse
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4418
e03df62e-2008-0410-955e-
edbf42e46eb7
irc::commasepstream items1(parameters[splithere]);
irc::commasepstream items2(parameters[extra]);
std::string item = "";
irc::commasepstream items1(parameters[splithere]);
irc::commasepstream items2(parameters[extra]);
std::string item = "";
/* Attempt to iterate these lists and call the command objech
* which called us, for every parameter pair until there are
/* Attempt to iterate these lists and call the command objech
* which called us, for every parameter pair until there are
/* Only one commasepstream here */
irc::commasepstream items1(parameters[splithere]);
std::string item = "";
/* Only one commasepstream here */
irc::commasepstream items1(parameters[splithere]);
std::string item = "";
/* Parse the commasepstream until there are no tokens remaining.
* Each token we parse out, call the command handler that called us
/* Parse the commasepstream until there are no tokens remaining.
* Each token we parse out, call the command handler that called us
bool userrec::AddBuffer(const std::string &a)
{
std::string b = "";
bool userrec::AddBuffer(const std::string &a)
{
std::string b = "";
- char* n = (char*)a.c_str();
- for (char* i = n; *i; i++)
+ for (std::string::const_iterator i = a.begin(); i != a.end(); i++)
{
if ((*i != '\r') && (*i != '\0') && (*i != 7))
b = b + *i;
{
if ((*i != '\r') && (*i != '\0') && (*i != 7))
b = b + *i;
bool userrec::BufferIsReady()
{
bool userrec::BufferIsReady()
{
- unsigned int t = recvq.length();
-
- for (unsigned int i = 0; i < t; i++)
- if (recvq[i] == '\n')
- return true;
- return false;
+ return (recvq.find('\n') != std::string::npos);
}
void userrec::ClearBuffer()
}
void userrec::ClearBuffer()
if (recvq == "")
return "";
if (recvq == "")
return "";
- char* line = (char*)recvq.c_str();
+ const char* line = recvq.c_str();
while ((*line != '\n') && (*line))
{
ret = ret + *line;
while ((*line != '\n') && (*line))
{
ret = ret + *line;