Compare commits

..

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

  1. 43
      ChannelSettings.iis
  2. 2
      Essentials.iis

@ -50,10 +50,7 @@ menu channel
showmessage("Not connected", "You are not connected to the server", "warn", "o");
return;
}
channelOrig = channel;
channel = strlower(channel);
if (chansethndl[channel] != void && dlgvalidhndl(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
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"));
@ -107,8 +104,7 @@ menu channel
hook numeric(code, params, message)
{
channel = strlower(params[1]);
channel = params[1];
if (channel == void)
return;
@ -117,10 +113,9 @@ hook numeric(code, params, message)
hndl = chansethndl[channel];
# No topic is set
# No topic is set.
if (code == "331") {
topicDone[channel] = true;
currentTopic[channel] = "";
}
# Topic received
@ -129,12 +124,11 @@ hook numeric(code, params, message)
topicDone[channel] = true;
currentTopic[channel] = message;
}
# Topic-by message is always a bit late to the party so must be unmuted separately.
else if (code == "333") {
/unmuteresp 333
}
# Mode list received
else if (code == "324") {
args = list();
@ -150,7 +144,7 @@ hook numeric(code, params, message)
# Ban list item received
else if (code == "367") {
handle = chansethndl[channel];
handle = chansethndl[params[1]];
mask = params[2];
setby = params[3];
@ -166,7 +160,7 @@ hook numeric(code, params, message)
# Invites list item received
else if (code == "346") {
handle = chansethndl[channel];
handle = chansethndl[params[1]];
mask = params[2];
setby = params[3];
@ -182,7 +176,7 @@ hook numeric(code, params, message)
# Exceptions list item received
else if (code == "348") {
handle = chansethndl[channel];
handle = chansethndl[params[1]];
mask = params[2];
setby = params[3];
@ -205,7 +199,6 @@ hook numeric(code, params, message)
#
hook mode(sender, target, modes)
{
target = strlower(target);
if (chansethndl[target] == void)
return;
handle = chansethndl[target];
@ -281,8 +274,6 @@ function findAndRemoveFromTable(handle, table, mask)
#
function checkAndHandleAllDone(channel)
{
channel = strlower(channel);
if ((topicDone[channel] == false)
|| (modesDone[channel] == false)
|| (bansDone[channel] == false)
@ -302,8 +293,6 @@ function checkAndHandleAllDone(channel)
#
function parseChannelModes(channel, modes, args)
{
channel = strlower(channel);
hndl = chansethndl[channel];
i = 0;
argi = 0; # Index of 'args', increments on group B and C.
@ -669,19 +658,9 @@ dialog channelsettings
height = 25;
hook clicked => {
channel = dlggetattr(handle, "channel");
newModes = createModeDiff(channel);
newModes = createModeDiff(channel);
if (strlen(newModes) > 0)
/mode %channel %newModes
newTopic = dlggetwidgetattr(handle, "topic", "text");
if (newTopic != currentTopic[channel]) {
if (newTopic == "")
/topic -c %channel
else
/topic %channel %newTopic
}
dlgclose(handle);
}
}
@ -693,8 +672,6 @@ dialog channelsettings
#
function createModeDiff(channel)
{
channel = strlower(channel);
hndl = chansethndl[channel];
unsetmodes = "";

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

Loading…
Cancel
Save