Compare commits

..

No commits in common. '2ea14bca4bb91f6e70e8bd95d1fbd4433791ff38' and 'bdc2f565939fa0e6fa59a774e44b284557f425f9' have entirely different histories.

  1. 35
      ChannelSettings.iis
  2. 2
      Essentials.iis

@ -51,9 +51,6 @@ menu channel
return; return;
} }
channelOrig = channel;
channel = strlower(channel);
if (chansethndl[channel] != void && dlgvalidhndl(chansethndl[channel])) if (chansethndl[channel] != void && dlgvalidhndl(chansethndl[channel]))
dlgclose(chansethndl[channel]); dlgclose(chansethndl[channel]);
@ -74,7 +71,7 @@ menu channel
# Custom attribute to keep track of which channel the dialog has an effect to # Custom attribute to keep track of which channel the dialog has an effect to
dlgsetattr(hndl, "channel", channel); dlgsetattr(hndl, "channel", channel);
dlgsetattr(hndl, "title", "Settings for " + channelOrig); dlgsetattr(hndl, "title", "Settings for " + channel);
dlgsetwidgetattr(hndl, "bantable", "header", list("Mask", "Set by", "Date")); dlgsetwidgetattr(hndl, "bantable", "header", list("Mask", "Set by", "Date"));
@ -107,8 +104,7 @@ menu channel
hook numeric(code, params, message) hook numeric(code, params, message)
{ {
channel = strlower(params[1]); channel = params[1];
if (channel == void) if (channel == void)
return; return;
@ -117,10 +113,9 @@ hook numeric(code, params, message)
hndl = chansethndl[channel]; hndl = chansethndl[channel];
# No topic is set # No topic is set.
if (code == "331") { if (code == "331") {
topicDone[channel] = true; topicDone[channel] = true;
currentTopic[channel] = "";
} }
# Topic received # Topic received
@ -130,7 +125,6 @@ hook numeric(code, params, message)
currentTopic[channel] = message; currentTopic[channel] = message;
} }
# Topic-by message is always a bit late to the party so must be unmuted separately.
else if (code == "333") { else if (code == "333") {
/unmuteresp 333 /unmuteresp 333
} }
@ -150,7 +144,7 @@ hook numeric(code, params, message)
# Ban list item received # Ban list item received
else if (code == "367") { else if (code == "367") {
handle = chansethndl[channel]; handle = chansethndl[params[1]];
mask = params[2]; mask = params[2];
setby = params[3]; setby = params[3];
@ -166,7 +160,7 @@ hook numeric(code, params, message)
# Invites list item received # Invites list item received
else if (code == "346") { else if (code == "346") {
handle = chansethndl[channel]; handle = chansethndl[params[1]];
mask = params[2]; mask = params[2];
setby = params[3]; setby = params[3];
@ -182,7 +176,7 @@ hook numeric(code, params, message)
# Exceptions list item received # Exceptions list item received
else if (code == "348") { else if (code == "348") {
handle = chansethndl[channel]; handle = chansethndl[params[1]];
mask = params[2]; mask = params[2];
setby = params[3]; setby = params[3];
@ -205,7 +199,6 @@ hook numeric(code, params, message)
# #
hook mode(sender, target, modes) hook mode(sender, target, modes)
{ {
target = strlower(target);
if (chansethndl[target] == void) if (chansethndl[target] == void)
return; return;
handle = chansethndl[target]; handle = chansethndl[target];
@ -281,8 +274,6 @@ function findAndRemoveFromTable(handle, table, mask)
# #
function checkAndHandleAllDone(channel) function checkAndHandleAllDone(channel)
{ {
channel = strlower(channel);
if ((topicDone[channel] == false) if ((topicDone[channel] == false)
|| (modesDone[channel] == false) || (modesDone[channel] == false)
|| (bansDone[channel] == false) || (bansDone[channel] == false)
@ -302,8 +293,6 @@ function checkAndHandleAllDone(channel)
# #
function parseChannelModes(channel, modes, args) function parseChannelModes(channel, modes, args)
{ {
channel = strlower(channel);
hndl = chansethndl[channel]; hndl = chansethndl[channel];
i = 0; i = 0;
argi = 0; # Index of 'args', increments on group B and C. argi = 0; # Index of 'args', increments on group B and C.
@ -669,19 +658,9 @@ dialog channelsettings
height = 25; height = 25;
hook clicked => { hook clicked => {
channel = dlggetattr(handle, "channel"); channel = dlggetattr(handle, "channel");
newModes = createModeDiff(channel); newModes = createModeDiff(channel);
if (strlen(newModes) > 0) if (strlen(newModes) > 0)
/mode %channel %newModes /mode %channel %newModes
newTopic = dlggetwidgetattr(handle, "topic", "text");
if (newTopic != currentTopic[channel]) {
if (newTopic == "")
/topic -c %channel
else
/topic %channel %newTopic
}
dlgclose(handle); dlgclose(handle);
} }
} }
@ -693,8 +672,6 @@ dialog channelsettings
# #
function createModeDiff(channel) function createModeDiff(channel)
{ {
channel = strlower(channel);
hndl = chansethndl[channel]; hndl = chansethndl[channel];
unsetmodes = ""; unsetmodes = "";

@ -47,6 +47,8 @@ hook ctcprequest(sender, target, command, message)
# For simplicity, set following to "false" if this is undesirable: # For simplicity, set following to "false" if this is undesirable:
response_CTCP_TIME = true; response_CTCP_TIME = true;
/echo ctcp: %sender %target %command %message
if (command == "TIME" && response_CTCP_TIME) { if (command == "TIME" && response_CTCP_TIME) {
t = now("yyyy/MM/dd hh:mm:ss t"); t = now("yyyy/MM/dd hh:mm:ss t");
/ctcpreply %sender TIME %t /ctcpreply %sender TIME %t

Loading…
Cancel
Save