If you know the current map id, you can use mlistc <nextmap id> <map name>
If you still want to make a console command for it, adapt Iran's AzazelBot setnextmap command, specifically:
int NextID = Get_Current_Map_Index() + 1;
const char *temp = Get_Map(NextID);
if( temp == NULL)
{
NextID = 0;
}
for(int i = 0;; i++)
{
const char *x = Get_Map(i);
if( x != NULL)
{
if (stristr(x, Msg[2]))
{
if (Set_Map(x, NextID))
{
IRC::Send("PRIVMSG %s :The next map was set to %s.\n", Channel, x);
}
else
{
IRC::Send("PRIVMSG %s :Unknown error trying to set map to %s.\n", Channel, x);
}
return;
}
}
else
{
break;
}
}
You'll need to change the IRC::Send calls to Console_Output, and put it into a command class obviously, but it should work