• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

polserver / polserver / 21100551564

17 Jan 2026 08:40PM UTC coverage: 60.504% (+0.01%) from 60.492%
21100551564

Pull #857

github

turleypol
fixed scope
Pull Request #857: ClangTidy readability-else-after-return

837 of 1874 new or added lines in 151 files covered. (44.66%)

48 existing lines in 26 files now uncovered.

44445 of 73458 relevant lines covered (60.5%)

515341.61 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

9.09
/pol-core/pol/module/clmod.cpp
1
/** @file
2
 *
3
 * @par History
4
 * - 2006/10/07 Shinigami: GCC 3.4.x fix - added "template<>" to TmplExecutorModule
5
 */
6

7

8
#include "clmod.h"
9
#include "../../bscript/berror.h"
10
#include "../../bscript/impstr.h"
11
#include "../../clib/passert.h"
12
#include "../../clib/rawtypes.h"
13
#include "../clfunc.h"
14
#include "../mobile/charactr.h"
15
#include "../network/pktdef.h"
16

17
#include <module_defs/cliloc.h>
18

19

20
namespace Pol::Module
21
{
22
using namespace Bscript;
23

24
ClilocExecutorModule::ClilocExecutorModule( Bscript::Executor& exec )
371✔
25
    : Bscript::TmplExecutorModule<ClilocExecutorModule, Core::PolModule>( exec )
371✔
26
{
27
}
371✔
28

29
BObjectImp* ClilocExecutorModule::mf_SendSysMessageCL()
×
30
{
31
  Mobile::Character* chr;
32
  const String* text;
33
  unsigned int cliloc_num;
34
  unsigned short color;
35
  unsigned short font;
36

37
  if ( getCharacterParam( 0, chr ) && getParam( 1, cliloc_num ) &&
×
38
       getUnicodeStringParam( 2, text ) && getParam( 3, font ) && getParam( 4, color ) )
×
39
  {
40
    passert_paranoid( chr != nullptr && text != nullptr );
41

42
    if ( !chr->has_active_client() )
×
43
      return new BError( "Mobile has no active client" );
×
44

45
    if ( text->length() > SPEECH_MAX_LEN )
×
46
      return new BError( "Text exceeds maximum size." );
×
47

48
    Core::send_sysmessage_cl( chr->client, cliloc_num, text->value(), font, color );
×
49
    return new BLong( 1 );
×
50
  }
51

NEW
52
  return new BError( "Invalid parameter type" );
×
53
}
54

55
BObjectImp* ClilocExecutorModule::mf_PrintTextAboveCL()
×
56
{
57
  Core::UObject* obj;
58
  const String* text;
59
  unsigned int cliloc_num;
60
  unsigned short color;
61
  unsigned short font;
62

63
  if ( getUObjectParam( 0, obj ) && getParam( 1, cliloc_num ) && getUnicodeStringParam( 2, text ) &&
×
64
       getParam( 3, font ) && getParam( 4, color ) )
×
65
  {
66
    passert_paranoid( text != nullptr && obj != nullptr );
67

68
    if ( text->length() > SPEECH_MAX_LEN )
×
69
      return new BError( "Text exceeds maximum size." );
×
70

71
    say_above_cl( obj, cliloc_num, text->value(), font, color );
×
72
    return new BLong( 1 );
×
73
  }
74

NEW
75
  return new BError( "Invalid parameter type" );
×
76
}
77

78
BObjectImp* ClilocExecutorModule::mf_PrintTextAbovePrivateCL()
×
79
{
80
  Mobile::Character* chr;
81
  Core::UObject* obj;
82
  const String* text;
83
  unsigned int cliloc_num;
84
  unsigned short color;
85
  unsigned short font;
86

87
  if ( getCharacterParam( 0, chr ) && getUObjectParam( 1, obj ) && getParam( 2, cliloc_num ) &&
×
88
       getUnicodeStringParam( 3, text ) && getParam( 4, font ) && getParam( 5, color ) )
×
89
  {
90
    passert_paranoid( chr != nullptr && text != nullptr && obj != nullptr );
91

92
    if ( !chr->has_active_client() )
×
93
      return new BError( "Mobile has no active client" );
×
94

95
    if ( chr->realm() != obj->realm() )
×
96
      return new BError( "Cannot print messages across realms!" );
×
97

98
    if ( text->length() > SPEECH_MAX_LEN )
×
99
      return new BError( "Text exceeds maximum size." );
×
100

101
    private_say_above_cl( chr, obj, cliloc_num, text->value(), font, color );
×
102
    return new BLong( 1 );
×
103
  }
104

NEW
105
  return new BError( "Invalid parameter type" );
×
106
}
107
}  // namespace Pol::Module
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc