<badhost host="*@hundredz.n.hundredz.o.1337.kiddies.com" reason="Too many 1337 kiddiots">
<badhost host="*@localhost" reason="No irc from localhost!">
+#-#-#-#-#-#-#-#-#-#-#- ALIAS DEFINITIONS -#-#-#-#-#-#-#-#-#-#-#-#-#-#
+# #
+# If you have the m_alias.so module loaded, you may also define #
+# aliases as shown below. They are commonly used to provide shortcut #
+# commands to services, however they are not limited to jsut this use.#
+# An alias tag requires the following values to be defined in it: #
+# #
+# text - The text to detect at the start of the line, #
+# must be at the start of the line to trigger the #
+# alias. May contain spaces, but case insensitive. #
+# replace - The text to replace 'text' with. Usually this #
+# will be "PRIVMSG ServiceName :" or similar. #
+# requires - If you provide a value for 'requires' this means #
+# the given nickname MUST be online for the alias #
+# to successfully trigger. If they are not, then #
+# the user receives a 'no such nick' 401 numeric. #
+# uline - Defining this value with 'yes', 'true' or '1' #
+# will ensure that the user given in 'requires' #
+# must also be on a u-lined server, as well as #
+# actually being on the network. If the user is #
+# online, but not on a u-lined server, then an #
+# oper-alert is sent out as this is possibly signs #
+# of a user trying to impersonate a service. #
+# #
+
+<alias text="NICKSERV" replace="PRIVMSG NickServ :" requires="NickServ" uline="yes">
+<alias text="CHANSERV" replace="PRIVMSG ChanServ :" requires="ChanServ" uline="yes">
+<alias text="NS ID" replace="PRIVMSG NickServ :identify" requires="NickServ" uline="yes">
+<alias text="NS" replace="PRIVMSG NickServ :" requires="NickServ" uline="yes">
+<alias text="CS" replace="PRIVMSG ChanServ :" requires="ChanServ" uline="yes">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#- YAWN -#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# #
* This method is the lowest level of handler available to a module. It will be called with raw
* data which is passing through a connected socket. If you wish, you may munge this data by changing
* the string parameter "raw". If you do this, after your function exits it will immediately be
- * cut down to 510 characters plus a carriage return and linefeed.
+ * cut down to 510 characters plus a carriage return and linefeed. For INBOUND messages only (where
+ * inbound is set to true) the value of user will be the userrec of the connection sending the
+ * data. This is not possible for outbound data because the data may be being routed to multiple targets.
*/
- virtual void OnServerRaw(std::string &raw, bool inbound);
+ virtual void OnServerRaw(std::string &raw, bool inbound, userrec* user);
/** Called whenever an extended mode is to be processed.
* The type parameter is MT_SERVER, MT_CLIENT or MT_CHANNEL, dependent on where the mode is being
[Project]
FileName=InspIRCd.dev
Name=InspIRCd - The Inspire Internet Relay Chat Daemon
-UnitCount=48
+UnitCount=49
Type=1
Ver=1
ObjFiles=
OverrideBuildCmd=0
BuildCmd=
+[Unit49]
+FileName=modules\m_alias.cpp
+CompileCpp=1
+Folder=Modules
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
[Editor_1]
Open=1
Top=0
-CursorCol=26
-CursorRow=1457
-TopLine=1420
+CursorCol=40
+CursorRow=2594
+TopLine=2549
LeftChar=1
[Editor_2]
[Editor_4]
Open=1
Top=0
-CursorCol=1
-CursorRow=163
-TopLine=135
+CursorCol=71
+CursorRow=120
+TopLine=92
LeftChar=1
[Editor_5]
LeftChar=1
[Editor_8]
-Open=0
+Open=1
Top=0
-CursorCol=1
-CursorRow=33
-TopLine=1
+CursorCol=50
+CursorRow=31
+TopLine=7
LeftChar=1
[Editor_9]
-Open=0
+Open=1
Top=0
CursorCol=1
CursorRow=113
-TopLine=58
+TopLine=26
LeftChar=1
[Editor_10]
LeftChar=1
[Editor_18]
-Open=0
+Open=1
Top=0
CursorCol=69
CursorRow=31
[Editor_20]
Open=1
Top=0
-CursorCol=5
-CursorRow=506
-TopLine=470
+CursorCol=107
+CursorRow=164
+TopLine=140
LeftChar=1
[Editor_21]
TopLine=23
LeftChar=1
[Editor_27]
-Open=0
+Open=1
Top=0
CursorCol=3
CursorRow=67
[Editor_37]
Open=1
Top=0
-CursorCol=3
-CursorRow=178
-TopLine=156
+CursorCol=5
+CursorRow=90
+TopLine=63
LeftChar=1
[Editor_38]
Open=1
Top=0
-CursorCol=30
-CursorRow=57
-TopLine=10
+CursorCol=72
+CursorRow=29
+TopLine=1
LeftChar=1
[Editor_39]
Open=1
Top=0
-CursorCol=25
-CursorRow=369
-TopLine=356
+CursorCol=42
+CursorRow=165
+TopLine=139
LeftChar=1
[Editor_40]
Open=1
LeftChar=1
[Editor_47]
Open=1
-Top=1
+Top=0
CursorCol=1
CursorRow=52
TopLine=4
LeftChar=1
+[Editor_48]
+Open=1
+Top=1
+CursorCol=60
+CursorRow=87
+TopLine=53
+LeftChar=1
for (int i = 0; i <= MODCOUNT; i++)
{
std::string oldtmp = tmp;
- modules[i]->OnServerRaw(tmp,true);
+ modules[i]->OnServerRaw(tmp,true,user);
if (oldtmp != tmp)
{
log(DEBUG,"A Module changed the input string!");
return;
}
string temp = str;
- FOREACH_MOD OnServerRaw(temp,false);
+ FOREACH_MOD OnServerRaw(temp,false,NULL);
const char* str2 = temp.c_str();
sprintf(str,"%s",str2);
void Module::OnPacketTransmit(char *p) { }
void Module::OnPacketReceive(char *p) { }
void Module::OnRehash() { }
-void Module::OnServerRaw(std::string &raw, bool inbound) { }
+void Module::OnServerRaw(std::string &raw, bool inbound, userrec* user) { }
int Module::OnUserPreJoin(userrec* user, chanrec* chan, const char* cname) { return 0; }
bool Module::OnExtendedMode(userrec* user, void* target, char modechar, int type, bool mode_on, string_list ¶ms) { return false; }
Version Module::GetVersion() { return Version(1,0,0,0); }
}
- virtual void OnServerRaw(std::string &raw, bool inbound)
+ virtual void OnServerRaw(std::string &raw, bool inbound, userrec* user)
{
if (inbound)
{