Add a basic mode request system
This commit is contained in:
parent
4b33741ba9
commit
281021bd47
22
rowbot
22
rowbot
|
@ -487,7 +487,7 @@ on_msg_005_welcome() {
|
||||||
# use it.
|
# use it.
|
||||||
# shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
isupport[$key]=$value
|
isupport[$key]=$value
|
||||||
debug "isupport: %s = %s" "$key" "$value"
|
log_debug "isupport: %s = %s" "$key" "$value"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -702,6 +702,12 @@ irc_join() {
|
||||||
net_send "JOIN %s" "${chans%,}"
|
net_send "JOIN %s" "${chans%,}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
irc_mode() {
|
||||||
|
if (( $# == 1 )); then
|
||||||
|
net_send "MODE ${config[nick]} ${config[modes]}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
irc_nick() {
|
irc_nick() {
|
||||||
net_send "NICK :%s" "$1"
|
net_send "NICK :%s" "$1"
|
||||||
}
|
}
|
||||||
|
@ -1035,6 +1041,20 @@ on_init_factoids() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# request default modes
|
||||||
|
|
||||||
|
on_init_mode_getter() {
|
||||||
|
get_option modes wigR
|
||||||
|
}
|
||||||
|
|
||||||
|
on_register_mode_getter() {
|
||||||
|
if [[ ${config[modes]:0:1} = @(+|-) ]]; then
|
||||||
|
config[modes]=+${config[modes]}
|
||||||
|
fi
|
||||||
|
|
||||||
|
irc_mode "${config[modes]}"
|
||||||
|
}
|
||||||
|
|
||||||
###
|
###
|
||||||
# cleanup
|
# cleanup
|
||||||
###
|
###
|
||||||
|
|
Loading…
Reference in New Issue