Remove useless spaces inside of braces "( stuff )"

This was generated via the following command:

  cat <file> | \
  tr "\n" "€"| \
  sed -r 's/€[\t ]*\{€/ {€/g; s/\( */(/g; s/ *\)/)/g' | \
  tr "€" "\n"

Thanks to SilverLeo for producing this mess :P


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1029 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2008-04-20 13:00:19 +00:00
parent 0470977497
commit b0a1714b86
18 changed files with 1017 additions and 1018 deletions
+32 -32
View File
@@ -17,19 +17,19 @@ public:
{
}
virtual bool OnLoad( const CString& sArgs, CString& sMessage );
virtual bool OnLoad(const CString& sArgs, CString& sMessage);
virtual EModRet OnUserPart( CString& sChannel, CString& sMessage )
virtual EModRet OnUserPart(CString& sChannel, CString& sMessage)
{
for ( MCString::iterator it = BeginNV(); it != EndNV(); it++ )
for (MCString::iterator it = BeginNV(); it != EndNV(); it++)
{
if ( sChannel.CaseCmp( it->first ) == 0 )
if (sChannel.CaseCmp(it->first) == 0)
{
CChan* pChan = m_pUser->FindChan( sChannel );
CChan* pChan = m_pUser->FindChan(sChannel);
if ( pChan )
if (pChan)
{
pChan->JoinUser( true, "", m_pClient );
pChan->JoinUser(true, "", m_pClient);
return HALT;
}
}
@@ -38,54 +38,54 @@ public:
return CONTINUE;
}
virtual void OnModCommand( const CString& sCommand )
virtual void OnModCommand(const CString& sCommand)
{
CString sCmdName = sCommand.Token(0);
CString sChannel = sCommand.Token(1);
sChannel.MakeLower();
if ( ( sCmdName == "stick" ) && ( !sChannel.empty() ) )
if ((sCmdName == "stick") && (!sChannel.empty()))
{
SetNV( sChannel, sCommand.Token(2) );
PutModule( "Stuck " + sChannel );
SetNV(sChannel, sCommand.Token(2));
PutModule("Stuck " + sChannel);
}
else if ( ( sCmdName == "unstick" ) && ( !sChannel.empty() ) )
else if ((sCmdName == "unstick") && (!sChannel.empty()))
{
MCString::iterator it = FindNV( sChannel );
if ( it != EndNV() )
DelNV( it );
MCString::iterator it = FindNV(sChannel);
if (it != EndNV())
DelNV(it);
PutModule( "UnStuck " + sChannel );
PutModule("UnStuck " + sChannel);
}
else if ( ( sCmdName == "list" ) && ( sChannel.empty() ) )
else if ((sCmdName == "list") && (sChannel.empty()))
{
int i = 1;
for( MCString::iterator it = BeginNV(); it != EndNV(); it++, i++ )
for(MCString::iterator it = BeginNV(); it != EndNV(); it++, i++)
{
if (it->second.empty())
PutModule(CString( i ) + ": " + it->first);
PutModule(CString(i) + ": " + it->first);
else
PutModule(CString( i ) + ": " + it->first + " (" + it->second + ")");
PutModule(CString(i) + ": " + it->first + " (" + it->second + ")");
}
PutModule(" -- End of List");
}
else
{
PutModule( "USAGE: [un]stick #channel [key], list" );
PutModule("USAGE: [un]stick #channel [key], list");
}
}
virtual void RunJob()
{
for( MCString::iterator it = BeginNV(); it != EndNV(); it++ )
for(MCString::iterator it = BeginNV(); it != EndNV(); it++)
{
if ( !m_pUser->FindChan( it->first ) )
if (!m_pUser->FindChan(it->first))
{
CChan *pChan = new CChan( it->first, m_pUser, true );
if ( !it->second.empty() )
pChan->SetKey( it->second );
m_pUser->AddChan( pChan );
PutModule( "Joining [" + it->first + "]" );
PutIRC( "JOIN " + it->first + ( it->second.empty() ? "" : it->second ) );
CChan *pChan = new CChan(it->first, m_pUser, true);
if (!it->second.empty())
pChan->SetKey(it->second);
m_pUser->AddChan(pChan);
PutModule("Joining [" + it->first + "]");
PutIRC("JOIN " + it->first + (it->second.empty() ? "" : it->second));
}
}
}
@@ -94,15 +94,15 @@ private:
};
static void RunTimer( CModule * pModule, CFPTimer *pTimer )
static void RunTimer(CModule * pModule, CFPTimer *pTimer)
{
((CStickyChan *)pModule)->RunJob();
}
bool CStickyChan::OnLoad(const CString& sArgs, CString& sMessage)
{
AddTimer( RunTimer, "StickyChanTimer", 15 );
return( true );
AddTimer(RunTimer, "StickyChanTimer", 15);
return(true);
}
MODULEDEFS(CStickyChan, "configless sticky chans, keeps you there very stickily even")